简体   繁体   中英

Syntax Error Trying To Run A Bundle Install GEMFILES

I'm following through a online course at https://onemonth.com/ , I was asked to add the bootstrap-sass gem to my Gemfile and then run bundle install .

Below is my Gemfile

source 'https://rubygems.org'

gem 'rails', '4.1.1'

gem 'sqlite3'


gem 'sass-rails', '~> 4.0.3'

gem 'uglifier', '>= 1.3.0'

gem 'coffee-rails', '~> 4.0.0'

gem 'jquery-rails'

gem 'turbolinks'

gem 'jbuilder', '~> 2.0'

gem 'bootstrap-sass',

gem 'sdoc', '~> 0.4.0',          group: :doc

gem 'spring',        group: :development

I ran bundle install and a Error message appeared:

Gemfile syntax error on line 11: syntax error, unexpected tSTRING_BEG, expecting
keyword_do or '{' or '('
gem 'sdoc', '~> 0.4.0',          group: :doc
     ^
on line 11: syntax error, unexpected ',', expecting end-of-input
gem 'sdoc', '~> 0.4.0',          group: :doc

I tried deleting the ',' after the gem 'sdoc', '~> 0.4.0', but nothing changed still giving me the same Error message...

Any idea of what's going wrong?

You have a comma at the end of the line. gem 'bootstrap-sass', should be gem 'bootstrap-sass' .

gem 'sdoc', '~> 0.4.0',          group: :doc

change to :

group :doc do
  gem 'sdoc', '~> 0.4.0'
end

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM