我无法执行sample_app gem文件

时间:2016-05-09 14:56:55

标签: ruby-on-rails

  

解析Gemfile时出错:   语法错误,意外的tIDENTIFIER,期待keyword_do或' {'或者'(' - ...... m' database_cleaner',git clone' git://github.com/maccman/gd ...   ...... ^   / home / phorekka / rails_project / sample_app / Gemfile:28:语法错误,意外的一元 - ,期待关键字_do或' {'或者'('   ... AN / gdata.git' " foobar的" --bare --no-hardlinks   ...... ^。 Bundler无法继续。

#from / home / phorekka / rails_project / sample_app / Gemfile:28  #-------------------------------------------  #gem' cucumber-rails',' 1.3.0',:require =>假>     gem' database_cleaner',git clone' git://github.com/maccman/gdata.git' " foobar的" --bare --no-hardlinks



   > Here is my gem file.
source 'https://rubygems.org'
ruby '2.0.0'
#ruby-gemset=railstutorial_rails_4_0

gem 'rails', '4.0.8'
gem 'bootstrap-sass', '2.3.2.0'
gem 'sprockets', '2.11.0'
gem 'bcrypt-ruby', '3.1.2'
gem 'faker', '1.1.2'
gem 'will_paginate', '3.0.4'
gem 'bootstrap-will_paginate', '0.0.9'

group :development, :test do
  gem 'sqlite3', '1.3.8'
  gem 'rspec-rails', '2.13.1'
  # The following optional lines are part of the advanced setup.
  gem 'guard-rspec', '2.5.0'
  gem 'spork-rails', '4.0.0'
  gem 'guard-spork', '1.5.0'
  gem 'childprocess', '0.3.6'
end

group :test do
  gem 'selenium-webdriver', '2.35.1'
  gem 'capybara', '2.1.0'
  gem 'factory_girl_rails', '4.2.0'
  gem 'cucumber-rails', '1.3.0', :require => false
  gem 'database_cleaner', github: 'bmabey/database_cleaner'

  # Uncomment this line on OS X.
  #gem 'growl', '1.0.3'

  # Uncomment these lines on Linux.
   gem 'libnotify', '0.8.0'

  # Uncomment these lines on Windows.
  # gem 'rb-notifu', '0.0.4'
  # gem 'win32console', '1.3.2'
  # gem 'wdm', '0.1.0'
end

gem 'sass-rails', '4.0.1'
gem 'uglifier', '2.1.1'
gem 'coffee-rails', '4.0.1'
gem 'jquery-rails', '3.0.4'
gem 'turbolinks', '1.1.1'
gem 'jbuilder', '1.0.2'

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

group :production do
  gem 'pg', '0.15.1'
  gem 'rails_12factor', '0.0.2'
end




  

我正在使用sqlite3 --version   3.8.11.1 2015-07-29 20:00:57 cf538e2783e468bbc25e7cb2a9ee64d3e0e80b2f。

   我无法运行这个gemfile。请帮帮我。

1 个答案:

答案 0 :(得分:0)

您的Gemfile与第三章中的Gemfile不同,

我刚用书中的那个替换了你的Gemfile: enter image description here

然后执行bundle install --without production并且工作正常。

之后再运行bundle update,你就会好起来。

如果您有其他问题,请亲自尝试并告诉我。