I'm in the process of setting up my own Github Pages. I wanted to test the site on local machine before pushing to the remote repo. I followed the instructions from https://help.github.com/en/github/working-with-github-pages/creating-a-github-pages-site-with-jekyll.
As per instructions, I tried jekyll 3.8.5 new command, since jekyll-3.8.5 is the version github pages uses (https://pages.github.com/versions/). However, jekyll is not able to find version 3.8.5 in my system.
This is on macOS Catalina, with rbenv installed to manage ruby versions. I have tried manually invoking the jekyll version 3.8.5. That totally works.
Here are some snippets from attempt. gem list do show 3.8.5 as available version. But jekyll 3.8.5 new command bombed out.
$ gem list jekyll
*** LOCAL GEMS ***
jekyll (4.0.0, 3.8.6, 3.8.5)
$ which jekyll
/Users/deep/.gem/ruby/2.6.0/bin/jekyll
$ jekyll 3.8.5 new mygh-site
fatal: 'jekyll 3.8.5' could not be found. You may need to install the jekyll-3.8.5 gem or a related gem to be able to use this subcommand.
I was able to explicitly invoke jekyll-3.8.5 from the path where it is installed.
$ /Users/deep/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/jekyll-3.8.5/exe/jekyll new mygh-site
How do I make use of version 3.8.5 when multiple versions of jekyll are present? Appreciate any help to get past this failure.