Gemfile:22:语法错误,意外的tIDENTIFIER,期待输入结束

时间:2022-07-09 22:54:04

When I run bundle install against the gemfile source below, I get a gemfile syntax error that points to the 'better errors' gem which is the second to last line.

当我对下面的gemfile源运行bundle install时,我得到一个gemfile语法错误,指向'更好的错误'gem,这是第二行到最后一行。

When I run ruby -c Gemfile. I get the following message

当我运行ruby -c Gemfile时。我收到以下消息

Gemfile:22: syntax error, unexpected tIDENTIFIER, expecting end-of-input gem 'better_errors'

Gemfile:22:语法错误,意外的tIDENTIFIER,期待输入结束的宝石'better_errors'

Any ideas?

source 'https://rubygems.org' 
ruby '2.0.0'
gem 'rails', '4.0.0'
 # Rails defaults
gem 'sqlite3'
gem 'sass-rails', '~> 4.0.0' 
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0' 
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 1.2'

# learn-rails
gem 'activerecord-tableless' 
gem 'bootstrap-sass'
gem 'figaro'
gem 'gibbon'
gem 'google_drive'
gem 'high_voltage'
gem 'simple_form', '>= 3.0.0.r  
group :development do
    gem 'better_errors'
    gem 'quiet_assets'
end 

Thank you for any assistance and time.

感谢您的帮助和时间。

2 个解决方案

#1


3  

You missed the closing ' here :

你在这里错过了收盘:

gem 'simple_form', '>= 3.0.0.r <~~~
group :development do
    gem 'better_errors'
    gem 'quiet_assets'
end

Corrected

gem 'simple_form', '>= 3.0.0.r'
group :development do
    gem 'better_errors'
    gem 'quiet_assets'
end

#2


0  

After your version number specification for gem "simple_form":

在你的gem“simple_form”的版本号规范之后:

">= 3.0.0.r\ngroup :development do\n    gem "

(which is already invalid), you cannot continue another token better_errors without having a comma (which would be invalid anyway).

(已经无效),你不能在没有逗号的情况下继续使用另一个令牌better_errors(无论如何都是无效的)。

#1


3  

You missed the closing ' here :

你在这里错过了收盘:

gem 'simple_form', '>= 3.0.0.r <~~~
group :development do
    gem 'better_errors'
    gem 'quiet_assets'
end

Corrected

gem 'simple_form', '>= 3.0.0.r'
group :development do
    gem 'better_errors'
    gem 'quiet_assets'
end

#2


0  

After your version number specification for gem "simple_form":

在你的gem“simple_form”的版本号规范之后:

">= 3.0.0.r\ngroup :development do\n    gem "

(which is already invalid), you cannot continue another token better_errors without having a comma (which would be invalid anyway).

(已经无效),你不能在没有逗号的情况下继续使用另一个令牌better_errors(无论如何都是无效的)。