您的 Gemfile 中出现错误,并且 Bundler 无法继续 [英] error in your Gemfile, and Bundler cannot continue
本文介绍了您的 Gemfile 中出现错误,并且 Bundler 无法继续的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我只是为开发设置了我的 mac,并且之前使用了这个确切的 gemfile,它运行良好.我不确定我做错了什么.
I just setup my mac for development and used this exact gemfile previously and it worked fine. I am not sure what I am doing wrong.
Victorias-MacBook-Pro:sample_app Victoria$ bundle --without production
/Users/Victoria/Sites/sample_app/Gemfile:38:in `evaluate': compile error
/Users/Victoria/Sites/sample_app/Gemfile:28: syntax error, unexpected ':', expecting kEND
gem 'cucumber-rails', '1.2.1', require: false
^ (SyntaxError)
/Library/Ruby/Gems/1.8/gems/bundler-1.1.3/lib/bundler/definition.rb:18:in `build'
/Library/Ruby/Gems/1.8/gems/bundler-1.1.3/lib/bundler.rb:135:in `definition'
/Library/Ruby/Gems/1.8/gems/bundler-1.1.3/lib/bundler/cli.rb:220:in `install'
/Library/Ruby/Gems/1.8/gems/bundler-1.1.3/lib/bundler/vendor/thor/task.rb:22:in `send'
/Library/Ruby/Gems/1.8/gems/bundler-1.1.3/lib/bundler/vendor/thor/task.rb:22:in `run'
/Library/Ruby/Gems/1.8/gems/bundler-1.1.3/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
/Library/Ruby/Gems/1.8/gems/bundler-1.1.3/lib/bundler/vendor/thor.rb:263:in `dispatch'
/Library/Ruby/Gems/1.8/gems/bundler-1.1.3/lib/bundler/vendor/thor/base.rb:386:in `start'
/Library/Ruby/Gems/1.8/gems/bundler-1.1.3/bin/bundle:13
/usr/bin/bundle:19:in `load'
/usr/bin/bundle:19
There was an error in your Gemfile, and Bundler cannot continue.
这是宝石文件
source 'https://rubygems.org'
gem 'rails', '3.2.3'
gem 'jquery-rails', '2.0.0'
gem 'bootstrap-sass', '2.0.0'
gem 'bcrypt-ruby', '3.0.1'
gem 'faker', '1.0.1'
gem 'will_paginate', '3.0.3'
gem 'bootstrap-will_paginate', '0.0.5'
group :development, :test do
gem 'mysql2'
gem 'rspec-rails', '2.9.0'
gem 'guard-rspec', '0.5.5'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '3.2.4'
gem 'coffee-rails', '3.2.2'
gem 'uglifier', '1.2.3'
end
group :test do
gem 'capybara', '1.1.2'
gem 'factory_girl_rails', '1.4.0'
gem 'cucumber-rails', '1.2.1', require: false
gem 'database_cleaner', '0.7.0'
gem 'guard-spork', '0.3.2'
gem 'spork', '0.9.0'
# gem 'rb-fsevent', '0.4.3.1', require: false
# gem 'growl', '1.0.3'
end
group :production do
gem 'pg', '0.12.2'
end
推荐答案
您正在运行 Ruby 1.8 并且语法 attribute:
需要 ruby 1.9.你需要改变
You're running Ruby 1.8 and the syntax attribute:
requires ruby 1.9. You will need to change
gem 'cucumber-rails', '1.2.1', require: false
到
gem 'cucumber-rails', '1.2.1', :require => false
或安装 Ruby 1.9(可能使用 RVM 或 rbenv)并再次运行 bundle install
.如果这是一个新项目,这将是一个更好的选择.
Or install Ruby 1.9 (maybe using RVM or rbenv) and run bundle install
again. This would be a much bettter option if it's a new project.
这篇关于您的 Gemfile 中出现错误,并且 Bundler 无法继续的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文