ruby 2.0.0 bundle fails with 'key: value' on Gemfile

こ雲淡風輕ζ 提交于 2019-12-10 19:48:34

问题


I'm trying to update my gems using a Gemfile but always fails in the same line:

Gemfile:

group :doc do
    gem 'sdoc', require: false
end

Command:

$ bundle update

I'm always getting this error:

Gemfile syntax error: /Users/GrzegorzFeathers/Documents/Edx/SaaS/rottenpotatoes/Gemfile:32: syntax error, unexpected ':', expecting kEND gem 'sdoc', require: false

When I change that line syntax to this, the problem was solved:

    gem 'sdoc', :require => false

But why can't I use the other one?, I checked my ruby version in two different ways and both says that I'm using ruby 2.0.0 so I should be able to use key: value syntax

$ ruby -v
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.3.0]

And:

$ rails console
2.0.0-p247 :001 > RUBY_VERSION
 => "2.0.0" 

Any idea of what's happening?

EDIT: To solve the problem I've just reinstalled the bundler gem, and then everything worked as expected :)

$ gem install bundler

来源:https://stackoverflow.com/questions/19529891/ruby-2-0-0-bundle-fails-with-key-value-on-gemfile

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!