Successfully installed jekyll-4.2.0, however still it searches for Jekyll-3.8.5

I have installed

sudo gem install jekyll
Successfully installed jekyll-4.2.0
Parsing documentation for jekyll-4.2.0
Done installing documentation for jekyll after 0 seconds
1 gem installed

Afterward, when I run bundle exec jekyll serve, it gives:

`Could not find jekyll-3.8.5 in any of the sources` and `Run bundle install to install missing gems.`

Then, after I run, it shows

Fetching source index from
ruby_dep-1.5.0 requires ruby version ~> 2.2, >= 2.2.5, which is incompatible with the current version, ruby 3.0.2p107

MacOS, BigSur, 11.4

sounds like it was already installed?

do you have a gemfile in the root of your repo/project? I don’t use one but I think it can peg the jekyll version to something particular? not sure.

I’d also paste the entire contents of the console - sometimes there are little clues in it.

I would avoid using a global Jekyll using gem install in the shell.

Use a Gemfile that specifies Jekyll 3.9 or 4.1 or 4.2 or whatever then install with Bundler.

It looks like the project you are working in already has a Gemfile or Gemfile.lock file specifying Jekyll 3.8.5 which is not yet installed.

So run this

bundle config set --local path vendor/bundle
bundle install 

Then make sure to run Jekyll through Bundler so it can be found

bundle exec jekyll serve 

PS GitHub Pages upgraded to Jekyll 3.9 for security so you should avoid 3.8.5 too.

Fantastic. It works perfectly!

1 Like