Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing rexml error when using docker compose #2880

Open
2 tasks done
riccobelli opened this issue Dec 7, 2024 · 14 comments
Open
2 tasks done

Missing rexml error when using docker compose #2880

riccobelli opened this issue Dec 7, 2024 · 14 comments
Labels

Comments

@riccobelli
Copy link
Contributor

Have you checked that your issue isn't already filed?

  • I read through FAQ and searched through the past issues, none of which addressed my issue.
  • Yes, I have checked that this issue isn't already filed.

Bug description

When starting docker compose the gem rexml appears to be missing

How to reproduce the bug

  1. Clone the repository
  2. Run docker compose up

Error messages and logs

Attaching to jekyll-1
jekyll-1  | Entry point script running
jekyll-1  | Gemfile.lock is tracked by git, keeping it intact
jekyll-1  | bundler: failed to load command: jekyll (/usr/local/bundle/bin/jekyll)
jekyll-1  | /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/definition.rb:603:in `materialize': Could not find rexml-3.3.9 in locally installed gems (Bundler::GemNotFound)
jekyll-1  | 	from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/definition.rb:193:in `specs'
jekyll-1  | 	from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/definition.rb:260:in `specs_for'
jekyll-1  | 	from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/runtime.rb:18:in `setup'
jekyll-1  | 	from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler.rb:164:in `setup'
jekyll-1  | 	from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/setup.rb:32:in `block in <top (required)>'
jekyll-1  | 	from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/ui/shell.rb:159:in `with_level'
jekyll-1  | 	from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/ui/shell.rb:111:in `silence'
jekyll-1  | 	from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/setup.rb:32:in `<top (required)>'
jekyll-1  | 	from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/cli/exec.rb:56:in `require_relative'
jekyll-1  | 	from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/cli/exec.rb:56:in `kernel_load'
jekyll-1  | 	from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/cli/exec.rb:23:in `run'
jekyll-1  | 	from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/cli.rb:455:in `exec'
jekyll-1  | 	from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run'
jekyll-1  | 	from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
jekyll-1  | 	from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'
jekyll-1  | 	from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/cli.rb:35:in `dispatch'
jekyll-1  | 	from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start'
jekyll-1  | 	from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/cli.rb:29:in `start'
jekyll-1  | 	from /usr/local/bundle/gems/bundler-2.5.18/exe/bundle:28:in `block in <top (required)>'
jekyll-1  | 	from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
jekyll-1  | 	from /usr/local/bundle/gems/bundler-2.5.18/exe/bundle:20:in `<top (required)>'
jekyll-1  | 	from /usr/local/bundle/bin/bundle:25:in `load'
jekyll-1  | 	from /usr/local/bundle/bin/bundle:25:in `<main>'

What operating system are you using?

Mac

Where are you seeing the problem on?

Running locally with Docker (docker compose)

More info

No response

@riccobelli riccobelli added the bug label Dec 7, 2024
@pashagolub
Copy link

Not only that package but a dozen of others in a random way, e.g.

Attaching to jekyll-1
jekyll-1  | Entry point script running
jekyll-1  | Gemfile.lock is tracked by git, keeping it intact
jekyll-1  | bundler: failed to load command: jekyll (/usr/local/bundle/bin/jekyll)
jekyll-1  | /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/resolver.rb:354:in `raise_not_found!': Could not find gem 'mini_racer' in locally installed gems. (Bundler::GemNotFound)
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/resolver.rb:445:in `block in prepare_dependencies'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/resolver.rb:420:in `each'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/resolver.rb:420:in `map'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/resolver.rb:420:in `prepare_dependencies'

@ChenDaiwei-99
Copy link

ChenDaiwei-99 commented Dec 8, 2024

I had the same issue on my local Mac system.

Update: I resolved the issue by following this local deployment tutorial, skipping the Docker setup altogether. 😅

@george-gca
Copy link
Collaborator

Try setting the version of the docker image used in your docker-compose.yml:

image: amirpourmand/al-folio:v0.12.1

We have been changing some dependencies (e.g. #2791), so the best solution for you is to use a specific image version.

You have an older code and it is probably set to use latest.

@osama-usuf
Copy link

Seeing the same on a Windows 10 machine running Docker via WSL2 integration. I'm using the latest code, with image: amirpourmand/al-folio:v0.12.1 inside my compose file.

@george-gca
Copy link
Collaborator

Try to decrease the version to a previous one like 0.12.0, as in the docker hub.

If it doesn't work, I recommend it to update your code to the tip of our main branch. Unfortunately we missed to create some extra tags while removing some dependencies in the past.

@riccobelli
Copy link
Contributor Author

riccobelli commented Dec 9, 2024

I confirm it is not working with the current version of the repository. I tried to go back to commit c170eaf and then it works (before the update of rexml 3.3.8 to 3.3.9 in commit b0d70d4).

@gabe-zhang
Copy link
Contributor

Try to decrease the version to a previous one like 0.12.0, as in the docker hub.

If it doesn't work, I recommend it to update your code to the tip of our main branch. Unfortunately we missed to create some extra tags while removing some dependencies in the past.

It's still not working with 0.12.0 and latest main branch f23e35e on WSL2.

Attaching to jekyll-1
jekyll-1  | Resolving dependencies...
jekyll-1  | /usr/local/bundle/gems/execjs-2.9.1/lib/execjs/runtimes.rb:68:in `autodetect': Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
jekyll-1  |     from /usr/local/bundle/gems/execjs-2.9.1/lib/execjs.rb:5:in `<module:ExecJS>'
jekyll-1  |     from /usr/local/bundle/gems/execjs-2.9.1/lib/execjs.rb:4:in `<top (required)>'
jekyll-1  |     from /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
jekyll-1  |     from /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
jekyll-1  |     from /usr/local/bundle/gems/uglifier-4.2.0/lib/uglifier.rb:5:in `<top (required)>'
jekyll-1  |     from /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
jekyll-1  |     from /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
jekyll-1  |     from /usr/local/bundle/gems/jekyll-minifier-0.1.10/lib/jekyll-minifier.rb:1:in `<top (required)>'
jekyll-1  |     from <internal:/usr/local/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
jekyll-1  |     from <internal:/usr/local/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
jekyll-1  |     from /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.14/lib/bundler/runtime.rb:60:in `block (2 levels) in require'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.14/lib/bundler/runtime.rb:55:in `each'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.14/lib/bundler/runtime.rb:55:in `block in require'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.14/lib/bundler/runtime.rb:44:in `each'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.14/lib/bundler/runtime.rb:44:in `require'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.14/lib/bundler.rb:212:in `require'
jekyll-1  |     from /usr/local/bundle/gems/jekyll-4.3.3/lib/jekyll/plugin_manager.rb:53:in `require_from_bundler'
jekyll-1  |     from /usr/local/bundle/gems/jekyll-4.3.3/exe/jekyll:11:in `<top (required)>'
jekyll-1  |     from /usr/local/bundle/bin/jekyll:25:in `load'
jekyll-1  |     from /usr/local/bundle/bin/jekyll:25:in `<main>'

@pashagolub
Copy link

The current version of repository has a bug! Check the output below, please. This is fresh Linux and fresh cloned repository.

$ git clone https://github.com/alshedivat/al-folio.git
Cloning into 'al-folio'...
remote: Enumerating objects: 20061, done.
remote: Counting objects: 100% (187/187), done.
remote: Compressing objects: 100% (27/27), done.
remote: Total 20061 (delta 85), reused 176 (delta 83), pack-reused 19874 (from 1)
Receiving objects: 100% (20061/20061), 211.75 MiB | 13.01 MiB/s, done.
Resolving deltas: 100% (7753/7753), done.
[node1] (local) [email protected] ~
$ cd al-folio/
[node1] (local) [email protected] ~/al-folio
$ git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean
[node1] (local) [email protected] ~/al-folio
$ git rev-parse HEAD
f23e35e043bdfba2eb85e6247cfaaa1465217823
[node1] (local) [email protected] ~/al-folio
$ docker compose up
[+] Running 2/2
 ✔ Network al-folio_default     Created                                                                   2.0s 
 ✔ Container al-folio-jekyll-1  Created                                                                   0.1s 
Attaching to jekyll-1
jekyll-1  | Entry point script running
jekyll-1  | Gemfile.lock is tracked by git, keeping it intact
jekyll-1  | bundler: failed to load command: jekyll (/usr/local/bundle/bin/jekyll)
jekyll-1  | /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/definition.rb:603:in `materialize': Could not find rexml-3.3.9 in locally installed gems (Bundler::GemNotFound)
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/definition.rb:193:in `specs'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/definition.rb:260:in `specs_for'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/runtime.rb:18:in `setup'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler.rb:164:in `setup'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/setup.rb:32:in `block in <top (required)>'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/ui/shell.rb:159:in `with_level'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/ui/shell.rb:111:in `silence'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/setup.rb:32:in `<top (required)>'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/cli/exec.rb:56:in `require_relative'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/cli/exec.rb:56:in `kernel_load'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/cli/exec.rb:23:in `run'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/cli.rb:455:in `exec'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/cli.rb:35:in `dispatch'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/cli.rb:29:in `start'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.18/exe/bundle:28:in `block in <top (required)>'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.18/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.18/exe/bundle:20:in `<top (required)>'
jekyll-1  |     from /usr/local/bundle/bin/bundle:25:in `load'
jekyll-1  |     from /usr/local/bundle/bin/bundle:25:in `<main>'
^CGracefully stopping... (press Ctrl+C again to force)
[+] Stopping 1/1
 ✔ Container al-folio-jekyll-1  Stopped 

@george-gca
Copy link
Collaborator

@gabe-zhang there are other previous versions before the 0.12.0. But like I said, if none works for you, try updating your code to the tip of our main branch. We missed some versioning of the containers.

@pashagolub in your case is the opposite. Dependabot updated the dependency, but here is pointing to the 0.12.1. You should point yours to the latest tag.

image: amirpourmand/al-folio:v0.12.1

@pourmand1376 how should we proceed with this? Keep in the main branch the docker-compose.yml always pointing to the latest tag, and only when creating a release should we change it to point to the correct docker tag?

@pourmand1376
Copy link
Collaborator

Hey.

It is becoming complicated.

What do you think about providing the user the option to choose and fix a version.

Like the tag should be default to latest. And if it is passed via command or .env, we use the specific tag version in that file.

@george-gca
Copy link
Collaborator

I don't think that fixes it, since the user still will have to manually set the version in the .env or pass as args, which could be the same as setting the value in the docker-compose file. The best solution I can currently think of is setting the version of the tag to the version of the repository. Is there any way we can fetch the current repository version and automatically fill it in the docker-compose somehow?

@george-gca
Copy link
Collaborator

The best solution I could think of so far is always keep the tag with the latest version (not latest, but v0.13.0 for example), then only updating it when an update is really necessary (like some change in dependencies).

@pourmand1376
Copy link
Collaborator

OK. That's good.

Let's also provide a way for people to change the tag without messing with docker-compose.yaml file.

@george-gca
Copy link
Collaborator

What is your suggestion? Also, where else will the version need to be changed? Because I think if the only place is in the docker compose, maybe we don't need to add another layer of config just for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants