我正在设置自己的Github页面。我想在推送到远程仓库之前在本地计算机上测试站点。我遵循了https://help.github.com/en/github/working-with-github-pages/creating-a-github-pages-site-with-jekyll中的指示。
按照说明,我尝试了jekyll 3.8.5 new
命令,因为jekyll-3.8.5是github页面使用的版本(https://pages.github.com/versions/)。但是,jekyll无法在我的系统中找到版本3.8.5。
这是在macOS Catalina上,安装了rbenv来管理ruby版本。我尝试手动调用jekyll版本3.8.5。那完全有效。
以下是一些尝试的摘要。 gem list
确实显示3.8.5为可用版本。但是jekyll 3.8.5 new
命令被炸了。
$ 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.
我能够从jekyll-3.8.5的安装路径中明确调用它。
$ /Users/deep/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/jekyll-3.8.5/exe/jekyll new mygh-site
当存在多个版本的jekyll时,如何使用3.8.5版本?感谢任何帮助来克服此故障。