Jekyll -v错误(Bundler :: GemNotFound)

时间:2017-11-01 00:34:14

标签: ruby jekyll rvm bundler

运行jekyll -v时,我得到以下信息:

/Users/myusername/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.0/lib/bundler/spec_set.rb:88:in 'block in materialize': Could not find jekyll-feed-0.9.2 in any of the sources (Bundler::GemNotFound)
from /Users/myusername/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.0/lib/bundler/spec_set.rb:82:in 'map!'
from /Users/myusername/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.0/lib/bundler/spec_set.rb:82:in 'materialize'
from /Users/myusername/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.0/lib/bundler/definition.rb:170:in 'specs'
from /Users/myusername/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.0/lib/bundler/definition.rb:237:in 'specs_for'
from /Users/myusername/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.0/lib/bundler/definition.rb:226:in 'requested_specs'
from /Users/myusername/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.0/lib/bundler/runtime.rb:108:in 'block in definition_method'
from /Users/myusername/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.0/lib/bundler/runtime.rb:20:in 'setup'
from /Users/myusername/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.0/lib/bundler.rb:107:in 'setup'
from /Users/myusername/.rvm/gems/ruby-2.4.2/gems/jekyll-3.6.2/lib/jekyll/plugin_manager.rb:50:in 'require_from_bundler'
from /Users/myusername/.rvm/gems/ruby-2.4.2/gems/jekyll-3.6.2/exe/jekyll:11:in '<top (required)>'
from /Users/myusername/.rvm/gems/ruby-2.4.2/bin/jekyll:23:in 'load'
from /Users/myusername/.rvm/gems/ruby-2.4.2/bin/jekyll:23:in '<main>'
from /Users/myusername/.rvm/gems/ruby-2.4.2/bin/ruby_executable_hooks:15:in 'eval'
from /Users/myusername/.rvm/gems/ruby-2.4.2/bin/ruby_executable_hooks:15:in '<main>'

更新

使用gem install jekyll-feed后,我得到以下内容:

/Users/myusername/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.0/lib/bundler/spec_set.rb:88:in 'block in materialize': Could not find minima-2.1.1 in any of the sources (Bundler::GemNotFound)
from /Users/myusername/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.0/lib/bundler/spec_set.rb:82:in 'map!'
from /Users/myusername/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.0/lib/bundler/spec_set.rb:82:in 'materialize'
from /Users/myusername/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.0/lib/bundler/definition.rb:170:in 'specs'
from /Users/myusername/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.0/lib/bundler/definition.rb:237:in 'specs_for'
from /Users/myusername/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.0/lib/bundler/definition.rb:226:in 'requested_specs'
from /Users/myusername/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.0/lib/bundler/runtime.rb:108:in 'block in definition_method'
from /Users/myusername/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.0/lib/bundler/runtime.rb:20:in 'setup'
from /Users/myusername/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.0/lib/bundler.rb:107:in 'setup'
from /Users/myusername/.rvm/gems/ruby-2.4.2/gems/jekyll-3.6.2/lib/jekyll/plugin_manager.rb:50:in 'require_from_bundler'
from /Users/myusername/.rvm/gems/ruby-2.4.2/gems/jekyll-3.6.2/exe/jekyll:11:in '<top (required)>'
from /Users/myusername/.rvm/gems/ruby-2.4.2/bin/jekyll:23:in 'load'
from /Users/myusername/.rvm/gems/ruby-2.4.2/bin/jekyll:23:in '<main>'
from /Users/myusername/.rvm/gems/ruby-2.4.2/bin/ruby_executable_hooks:15:in 'eval'
from /Users/myusername/.rvm/gems/ruby-2.4.2/bin/ruby_executable_hooks:15:in '<main>'

2 个答案:

答案 0 :(得分:1)

您似乎没有安装其他gem,请尝试安装它

gem install jekyll-feed

答案 1 :(得分:1)

你有很多关于依赖关系的相关问题。要确保一切正常,请添加Gemfile内容:

source "https://rubygems.org"

ruby "2.4.2"

gem 'github-pages' # helpfully pulls in more than just jekyll

然后运行bundle。然后当你想要运行jekyll时,做bundle exec jekyll,你应该没问题。