【发布时间】:2020-11-30 08:14:38
【问题描述】:
我刚刚在使用 rubyinstaller 更新 ruby 后重新安装了 jekyll,然后运行 gem install jekyll bundler,一切都安装好了。之后,当我在“我的目录”中运行 jekyll 时,我收到以下错误消息。如果我运行 bundle exec jekyll 一切都按预期工作。此外,如果我在不同的目录中运行 jekyll,它也可以正常运行。我也想在“我的目录”中运行 jekyll。怎么做 ? 以下是我收到的错误消息。
jekyll
Traceback (most recent call last):
10: from C:/Ruby27-x64/bin/jekyll:23:in `<main>'
9: from C:/Ruby27-x64/bin/jekyll:23:in `load'
8: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.1.1/exe/jekyll:11:in `<top (required)>'
7: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.1.1/lib/jekyll/plugin_manager.rb:52:in `require_from_bundler'
6: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/lib/bundler.rb:149:in `setup'
5: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/runtime.rb:26:in `setup'
4: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/runtime.rb:26:in `map'
3: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/spec_set.rb:147:in `each'
2: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/spec_set.rb:147:in `each'
1: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/runtime.rb:31:in `block in setup'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/runtime.rb:312:in `check_for_activated_spec!': You have already activated mercenary 0.4.0, but your Gemfile requires mercenary 0.3.6. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
【问题讨论】: