宝石语法错误问题 [英] Gem syntax error questions

查看:100
本文介绍了宝石语法错误问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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’

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

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

我缺少什么?

推荐答案

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

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.

这篇关于宝石语法错误问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆