目标
使用 Jekyll 启动 Github 页面。我正在关注 Github Pages docs .
问题
执行后:bundle exec jekyll 3.8.7 new .
返回以下错误:fatal: 'jekyll 3.8.7' could not be found. You may need to install the jekyll-3.8.7 gem or a related gem to be able to use this subcommand.
.
还要注意 (a) Jekyll 3.8.7 是 current dependency version for Github Pages (b) 如果我为 Jekyll 4.1.0 尝试它,则会返回相同的错误。
语境
我尝试了 this SO post 中的推荐-- $ bundle init
, $ bundle add jekyll
——但这并没有解决我的问题。
系统详情:
$ which ruby
/Users/vishrutarya/.rbenv/shims/ruby
$ ruby -v
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-darwin19]
$ jekyll -v
jekyll 4.1.0
$ which jekyll
/Users/vishrutarya/.gem/ruby/2.7.0/bin/jekyll
最佳答案
对我来说,添加下划线可以解决问题。
我手动安装了 3.8.7 版。与 gem list
,你可以检查它是否
实际安装。
然后我用了 bundle exec jekyll _3.8.7_ new . --force
它奏效了。
关于ruby - Github 页面的 `bundle exec jekyll 3.8.7 new .` 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62314367/