Gem syntax error questions

2019-01-27 06:03发布

I can't figure out what's wrong with my syntax in my Gemfile. Any time I try to run $ bundle install I get this error message:

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

I have tried adjusting the gemfile to different versions of ruby that I have running on my system, but it gives me the same error message. The carrot underneath the version number is also always in the same place. This is my 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

What am I missing?

1条回答
霸刀☆藐视天下
2楼-- · 2019-01-27 06:42

I had opened the gemfile in Text Edit and it replaced the single quotes with different ASCII encoded quotes. Opened it in Sublime 2 and replaced the single quotes and that fixed it.

查看更多
登录 后发表回答