When I try to build jekyll from the following docker image I get an error message on the bundler step.
> [build 6/9] RUN bundle install:
#12 0.417 Bundler 2.3.11 is running, but your lockfile was generated with 2.1.4. Installing Bundler 2.1.4 and restarting using that version.
#12 1.640 Fetching gem metadata from https://rubygems.org/.
#12 1.679 Fetching bundler 2.1.4
#12 1.979 Installing bundler 2.1.4
#12 2.760 Fetching gem metadata from https://rubygems.org/.........
#12 4.111 listen-3.2.1 requires ruby version >= 2.2.7, ~> 2.2, which is incompatible with
#12 4.111 the current version, ruby 3.1.1p18
------
executor failed running [/bin/sh -c bundle install]: exit code: 5
This happens on my local machine and codespaces. It akways worked but some weeks ago it stopped working
Every help is appreciated!
If I had this problem I would try to delete the lockfile (or moving it out of the directory). It will be recreated.
When you get messages like this, it is telling you to update the packages Jekyll requires. Usually, all you have to do is the following:
bundle install
bundle update
If that does not work, then I agree with @michaelbach. Delete the gemfile.lock
file and then run:
bundle install
bundle update
Nothing I see at this point is in any way related to the Docker image and is just related to dependencies Jekyll requires to run properly.
That said, if you are using a pre-built Docker image or are not sure if you have the proper versions of products installed, I created a deep-dive video to show you all the steps to create your own Docker Jekyll container. The video also includes the steps to update dependencies, which is the issue you are having at the moment.