宝石语法错误问题

时间:2014-03-01 06:48:28

标签: syntax gem gemfile

我无法弄清楚我的Gemfile中的语法有什么问题。每当我尝试运行$ bundle install时,都会收到以下错误消息:

Gemfile syntax error:
ruby ‘2.1.1’
          ^
/Users/[User]/Work/application/Gemfile:2: syntax error, unexpected tFLOAT, expecting '('
ruby ‘2.1.1’

我已经尝试将gemfile调整为我在系统上运行的不同版本的ruby,但它给了我相同的错误消息。版本号下面的胡萝卜也总是在同一个地方。这是我的Gemfile:

source 'https://rubygems.org'
ruby ‘2.1.1’

gem 'coffee-rails', '~> 4.0.0'
gem 'jbuilder', '~> 1.2'
gem 'jquery-rails'
gem 'rails', '4.0.2'
gem 'rails_12factor'
gem 'sass-rails', '~> 4.0.0'
gem 'turbolinks'
gem 'uglifier', '>= 1.3.0'

gem 'authlogic'
gem 'aws-s3'
gem 'google-api-client', :require => 'google/api_client'
gem 'google_visualr', '>= 2.1'
gem 'haml-rails'
gem 'httparty'
gem 'mysql2'#, '0.3.12b4'
gem 'nokogiri'
gem 'oauth2'
# gem 'pg'
gem 'redis'
gem 'resque'#, '~> 1.22.0'
gem 'rmagick', require: 'RMagick'#, '2.12.0'
gem 's3_direct_upload'
gem 'sendgrid'
gem 'scout'
gem 'thinking-sphinx'#, '3.0.3'
gem 'unicorn'


group :development do
  gem 'dotenv-rails' # for dan 'cause he uses pow
  gem 'foreman' # for dan 'cause he uses pow
  gem 'mailcatcher'
  gem 'annotate'
end

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

我错过了什么?

1 个答案:

答案 0 :(得分:2)

我在Text Edit中打开了gemfile,它用不同的ASCII编码引号替换了单引号。在Sublime 2中打开它并替换单引号并修复它。