va0*_*a01 6 ruby bundler jekyll github-pages
使用 Jekyll 启动 Github 页面。我正在关注Github Pages 文档。
执行后:
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 是Github Pages的当前依赖版本,(b) 如果我尝试使用 Jekyll 4.1.0,则会返回相同的错误。
我尝试了这篇 SO 帖子中的建议-- $ 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
在 MacOS 上遇到了同样的问题。这就是我最终所做的:
blogbundle initgem "jekyll", "= 3.8.7"bundle ibundle exec jekyll -vdocs/在同一文件夹中创建一个目录bundle exec jekyll new .bundle i下再次运行docs/bundle exec jekyll serve在docs/目录中运行我希望这有帮助!