Gem的Jekyll版本错误

时间:2016-12-29 12:24:56

标签: ruby rubygems jekyll

我安装了最新的Jekyll(3.3.1),但Gem / Ruby仍然认为我在3.2.1。 E.g:

$ jekyll --version
/Users/userx/.rvm/gems/ruby-2.4.0/gems/bundler-1.13.7/lib/bundler/resolver.rb:203:in `rescue in start': Bundler could not find compatible versions for gem "jekyll": (Bundler::VersionConflict)
  In Gemfile:
    jekyll (= 3.2.1)

    minima was resolved to 2.1.0, which depends on
      jekyll (~> 3.3)
    from /Users/userx/.rvm/gems/ruby-2.4.0/gems/bundler-1.13.7/lib/bundler/resolver.rb:199:in `start'
    from /Users/userx/.rvm/gems/ruby-2.4.0/gems/bundler-1.13.7/lib/bundler/resolver.rb:181:in `resolve'
    from /Users/userx/.rvm/gems/ruby-2.4.0/gems/bundler-1.13.7/lib/bundler/definition.rb:250:in `resolve'
    from /Users/userx/.rvm/gems/ruby-2.4.0/gems/bundler-1.13.7/lib/bundler/definition.rb:174:in `specs'
    from /Users/userx/.rvm/gems/ruby-2.4.0/gems/bundler-1.13.7/lib/bundler/definition.rb:233:in `specs_for'
    from /Users/userx/.rvm/gems/ruby-2.4.0/gems/bundler-1.13.7/lib/bundler/definition.rb:222:in `requested_specs'
    from /Users/userx/.rvm/gems/ruby-2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:118:in `block in definition_method'
    from /Users/userx/.rvm/gems/ruby-2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:19:in `setup'
    from /Users/userx/.rvm/gems/ruby-2.4.0/gems/bundler-1.13.7/lib/bundler.rb:99:in `setup'
    from /Users/userx/.rvm/gems/ruby-2.4.0/gems/jekyll-3.3.1/lib/jekyll/plugin_manager.rb:36:in `require_from_bundler'
    from /Users/userx/.rvm/gems/ruby-2.4.0/gems/jekyll-3.3.1/exe/jekyll:9:in `<top (required)>'
    from /Users/userx/.rvm/gems/ruby-2.4.0/bin/jekyll:22:in `load'
    from /Users/userx/.rvm/gems/ruby-2.4.0/bin/jekyll:22:in `<main>'
    from /Users/userx/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:15:in `eval'
    from /Users/userx/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:15:in `<main>'

~/.rvm/gems/ruby-2.4.0/gems/文件夹包含文件夹jekyll-3.2.1jekyll-3.3.1。正在运行gem install jekyll会返回Successfully installed jekyll-3.3.1。知道这里的问题是什么吗?

1 个答案:

答案 0 :(得分:1)

在您的Gemfile中更改:gem 'jekyll', '3.2.1' gem 'jekyll'

然后:bundle update