alshedivat / al-folio

A beautiful, simple, clean, and responsive Jekyll theme for academics
https://alshedivat.github.io/al-folio/
MIT License
11.22k stars 11.25k forks source link

Version Issue from Docker Compose #2733

Closed jagar2 closed 1 month ago

jagar2 commented 1 month ago

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

Bug description

Main Branch Does not build

How to reproduce the bug

When I git clone the repo on a clean branch and run docker compose up the website does not build

Error messages and logs

jekyll-1  | Gemfile.lock is tracked by git, keeping it intact
jekyll-1  | /usr/local/bundle/gems/bundler-2.5.7/lib/bundler/definition.rb:596:in `materialize': Could not find sass-embedded-1.79.3-x86_64-linux-gnu in locally installed gems (Bundler::GemNotFound)
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.7/lib/bundler/definition.rb:203:in `specs'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.7/lib/bundler/definition.rb:270:in `specs_for'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.7/lib/bundler/runtime.rb:18:in `setup'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.7/lib/bundler.rb:162:in `setup'
jekyll-1  |     from /usr/local/bundle/gems/jekyll-4.3.4/lib/jekyll/plugin_manager.rb:52:in `require_from_bundler'
jekyll-1  |     from /usr/local/bundle/gems/jekyll-4.3.4/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>'

What operating system are you using?

Linux

Where are you seeing the problem on?

Running locally with Docker

More info

No response

dylanhogan commented 1 month ago

I'm getting a similar error, also running locally with Docker on Linux:

jekyll-1  | Gemfile.lock is tracked by git, keeping it intact
jekyll-1  | /usr/local/bundle/gems/bundler-2.5.7/lib/bundler/runtime.rb:304:in `check_for_activated_spec!': You have already activated sass-embedded 1.79.4, but your Gemfile requires sass-embedded 1.79.3. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.7/lib/bundler/runtime.rb:25:in `block in setup'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.7/lib/bundler/spec_set.rb:191:in `each'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.7/lib/bundler/spec_set.rb:191:in `each'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.7/lib/bundler/runtime.rb:24:in `map'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.7/lib/bundler/runtime.rb:24:in `setup'
jekyll-1  |     from /usr/local/bundle/gems/bundler-2.5.7/lib/bundler.rb:162:in `setup'
jekyll-1  |     from /usr/local/bundle/gems/jekyll-4.3.4/lib/jekyll/plugin_manager.rb:52:in `require_from_bundler'
jekyll-1  |     from /usr/local/bundle/gems/jekyll-4.3.4/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>'

Appreciate any help.

george-gca commented 1 month ago

Did you make any modifications to your Gemfile.lock?

jagar2 commented 1 month ago

Did you make any modifications to your Gemfile.lock?

No I did not. Fresh pull.

Laura05010 commented 1 month ago

I'm having the same issue :/ Not sure how to fix it

Nemo0312 commented 1 month ago

having similar issue, however, interesting find docker will actually compile and server the page if you delete gemfile.lock and let docker recreate it. But it will give the same error if you make a change and re-serve the page or if you redeploy docker.

nuria95 commented 1 month ago

Having same issue as @dylanhogan in macOS.

tomas-hansen commented 1 month ago

Same problem here, using windows with wsl

george-gca commented 1 month ago

Maybe this has something to do with this @pourmand1376?

https://github.com/alshedivat/al-folio/blob/c20074c8cab8df2050350e2367482fdd5328a08e/.devcontainer/devcontainer.json#L16

Laura05010 commented 1 month ago

would going to a previous version work ? which version of the project doesn't have this issue ?

Nemo0312 commented 1 month ago

Maybe this has something to do with this @pourmand1376?

https://github.com/alshedivat/al-folio/blob/c20074c8cab8df2050350e2367482fdd5328a08e/.devcontainer/devcontainer.json#L16

I tried reverting the "entry_point.sh" to the 0.11.0 version. still same error

anvuongb commented 1 month ago

I have the same issue, fresh pull from master, Ubuntu 22.04, Docker version 27.3.1-build ce12230.

p/s: it works if I delete the Gemfile.lock and let the build generates it.

cmanage1 commented 1 month ago

Seeing a similar issue on WSL2, Ubuntu 22.04.4 LTS, Docker version 27.3.1, build ce12230.

al-folio-website  | bundler: failed to load command: jekyll (/usr/local/bundle/bin/jekyll)
al-folio-website  | /usr/local/bundle/gems/bundler-2.5.20/lib/bundler/resolver.rb:354:in `raise_not_found!': Could not find gem 'jekyll-diagrams' in locally installed gems. (Bundler::GemNotFound)
al-folio-website  |     from /usr/local/bundle/gems/bundler-2.5.20/lib/bundler/resolver.rb:445:in `block in prepare_dependencies'
al-folio-website  |     from /usr/local/bundle/gems/bundler-2.5.20/lib/bundler/resolver.rb:420:in `each'
al-folio-website  |     from /usr/local/bundle/gems/bundler-2.5.20/lib/bundler/resolver.rb:420:in `map'
al-folio-website  |     from /usr/local/bundle/gems/bundler-2.5.20/lib/bundler/resolver.rb:420:in `prepare_dependencie
Laura05010 commented 1 month ago

I just downloaded the latest version on MacOS. Still getting the same issue. Only thing that seems to be working so far is to delete the Gemfile.lock , make updates and then run docker compose up to test the site

New to this :) @pourmand1376 thank you so much ! I opened the fix and just changed line 4 of docker-compose.yml to this : image: amirpourmand/al-folio:v0.12.0 as you did and it works now !

pourmand1376 commented 1 month ago

Hey Guys.

Thanks for bringing up this issue.

The problem is that your docker image is not matching the latest docker image that we have:

docker compose pull
docker compose up -d

This should solve the problem completely.

george-gca commented 1 month ago

Question for everyone running into this issue. How exactly have you been running with docker? Using docker compose manually, or using dev container?

raphael-FUH commented 1 month ago

I ran into this issue by using docker compose manually: docker compose pull docker compose up

Following the above solution of @Laura05010 finally solved it for me. (image: amirpourmand/al-folio:v0.12.0 instead of image: amirpourmand/al-folio:latest)

pourmand1376 commented 1 month ago

@raphael-FUH So, only using

Docker compose pull
Docker compose up

Didn't work? If that's the case, what is the error?

nuria95 commented 1 month ago

The problem seems to be finally solved for me now. Retried: docker compose pull docker compose up and works! Thanks for fixing it (at least for me) :)