找不到执行gem jekyll的可执行文件--- Jekyll无法被执行

10
bundle exec jekyll serve
Traceback (most recent call last):
    4: from /Users/Suwan_Long/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `<main>'
    3: from /Users/Suwan_Long/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `eval'
    2: from /Users/Suwan_Long/.rvm/rubies/ruby-2.6.3/bin/jekyll:23:in `<main>'
    1: from /Users/Suwan_Long/.rvm/gems/ruby-2.6.3/gems/bundler-2.0.2/lib/bundler/rubygems_integration.rb:480:in `block in replace_bin_path'
/Users/Suwan_Long/.rvm/gems/ruby-2.6.3/gems/bundler-2.0.2/lib/bundler/rubygems_integration.rb:460:in `block in replace_bin_path': can't find executable jekyll for gem jekyll. jekyll is not currently included in the bundle, perhaps you meant to add it to your Gemfile? (Gem::Exception)

我安装了Jekyll和ruby,但仍然显示没有可执行的jekyll。请有人能帮我解决吗?谢谢!:)
1个回答

19

错误信息中的以下语句已经说明了一切。

jekyll is not currently included in the bundle, perhaps you meant to add it to your Gemfile?

编辑 Gemfile 文件以包含 jekyll gem:

gem "jekyll", "~> 4.0"

谢谢,我已经解决了这个问题,但是忘记在这里更新了。圣诞快乐 :) - Suwan
苏旺,祝你也圣诞快乐。 - ashmaroli
谢谢您提供的解决方案,非常有帮助。我发现可以使用“bundle add jekyll”命令来添加行而不是手动添加。使用此命令,它为我插入了正确的版本号。 - user840474
很高兴能帮助你,John。 - ashmaroli
在编辑Gemfile文件后需要运行bundle install吗? - ComputerScientist
是的。运行 bundle install 将安装满足指定版本要求的最新版本。 - ashmaroli

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接