问题
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