Rails Bundle安装问题

时间:2014-05-20 02:17:24

标签: ruby-on-rails rspec bundle

当我尝试在终端中运行bundle install时。我收到此错误消息。

Gemfile syntax error on line 36: syntax error, unexpected tIDENTIFIER, expecting

keyword_end

我的gem文件中的代码如下。我正在尝试安装rspec,它在没有最后9行的情况下工作得很好。所以问题出在那个部分的某个地方,但我无法弄明白。任何指导将不胜感激!

    source 'https://rubygems.org'


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer',  platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0',          group: :doc

# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring',        group: :development

source 'http://rubygems.org'
gem 'rails', '3.0.0'
gem 'sqlite3-ruby', '1.2.5', :require => 'sqlite3'
group :development do
gem 'rspec-rails', '2.0.0'
end
group :test do
gem 'rspec', '2.0.0' gem 'webrat', '0.7.1'
end

1 个答案:

答案 0 :(得分:2)

第36行

你有这个:

group :test do
    gem 'rspec', '2.0.0' gem 'webrat', '0.7.1'
end

但你应该有这个(你需要一个新行)

group :test do
    gem 'rspec', '2.0.0'
    gem 'webrat', '0.7.1'
end

每个gem必须独立