Github页面的 "bundle ex jecyll 3.8.7 new .`"出现错误。

问题描述 投票:1回答:1

目标

用Jekyll发起一个Github页面。我遵循的是 Github页面文档.

问题

执行后。

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是在Jekyll 3.8.7中的 当前Github Pages的依赖版本 和(b)如果我对Jekyll 4.1.0尝试这样做,会返回同样的错误。

上下文

我试过在 这个职位 -- $ 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

ruby jekyll bundler github-pages
1个回答
0
投票

在MacOS上也遇到了同样的问题。这是我最后做的。

  1. 创建一个新的目录,我们把它叫做: blog
  2. 运转 bundle init
  3. 在Gemfile中,添加以下一行 gem "jekyll", "= 3.8.7"
  4. 运转 bundle i
  5. 你可以通过发出以下命令来验证jekyll的版本 jekyll -v
  6. 创建一个 docs/ 同一文件夹下
  7. 运转 bundle exec jekyll new .
  8. 运转 bundle i 又在 docs/ 目录
  9. 上菜,跑 bundle exec jekyll servedocs/ 目录

希望对大家有所帮助!

© www.soinside.com 2019 - 2024. All rights reserved.