如何在安装Jekyll时解决此错误?

时间:2015-04-11 14:45:28

标签: ruby ubuntu gem jekyll

我跟着this page安装了Jekyll,但是当我试图运行Jekyll时出现了这个错误:

/usr/local/lib/site_ruby/2.1.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'liquid' (~> 2.5.5) - did find: [liquid-3.0.1,liquid-2.6.1] (Gem::LoadError)
Checked in 'GEM_PATH=/home/ali/.gem/ruby/2.1.0:/var/lib/gems/2.1.0:/usr/share/rubygems-integration/2.1.0:/usr/share/rubygems-integration/2.1:/usr/share/rubygems-integration/all', execute `gem env` for more information
    from /usr/local/lib/site_ruby/2.1.0/rubygems/specification.rb:1311:in `block in activate_dependencies'
    from /usr/local/lib/site_ruby/2.1.0/rubygems/specification.rb:1300:in `each'
    from /usr/local/lib/site_ruby/2.1.0/rubygems/specification.rb:1300:in `activate_dependencies'
    from /usr/local/lib/site_ruby/2.1.0/rubygems/specification.rb:1282:in `activate'
    from /usr/local/lib/site_ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:67:in `block in gem'
    from /usr/local/lib/site_ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:66:in `synchronize'
    from /usr/local/lib/site_ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:66:in `gem'
    from /usr/local/bin/jekyll:22:in `<main>'

1 个答案:

答案 0 :(得分:0)

此错误表示jekyll需要的液体Gem版本低于您安装的版本。您应该考虑安装正确的版本,即v2.5.5。

gem install liquid -v 2.5.5

应该解决这个问题。