0

I am following the Hartl Ruby on Rails tutorial, and am in section 1.2.4 of the tutorial

When setting up a Rails app it says to run these commands:

cd first_app_direcory sublime Gemfile bundle update 

The sublime Gemfile command edits the Gemfile obviously, but when I try to run the command bundle update I get the following error:

bundle update Gemfile syntax error: ruby 2.0.0 ^ /home/cameron/ruby/ror/first_app/Gemfile:2: syntax error, unexpected tINTEGER, expecting '(' ruby 2.0.0 ^ 

I took these two lines out of the gemfile, even though it says to include them. Also, I tried Ruby 1.9.3, and still got the same error message.

ruby 2.0.0 #ruby-gemset=railstutorial_rails_4_0 

After taking these lines out, it worked. I am trying to get it to work with those lines in the gemfile though. How can I do this?

This is the full Gemfile:

source 'https://rubygems.org' ruby 2.0.0 #ruby-gemset=railstutorial_rails_4_0 # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '4.0.0' # Use sqlite3 as the database for Active Record group :developent do gem 'sqlite3', '1.3.7' end # Use SCSS for stylesheets gem 'sass-rails', '4.0.0' # Use Uglifier as compressor for JavaScript assets gem 'uglifier', '2.1.1' # Use CoffeeScript for .js.coffee assets and views gem 'coffee-rails', '4.0.0' # See https://github.com/sstephenson/execjs#readme for more supported runtimes # gem 'therubyracer', platforms: :ruby # Use jquery as the JavaScript library gem 'jquery-rails', '2.2.1' # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks gem 'turbolinks', '1.1.1' # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder gem 'jbuilder', '1.0.2' group :doc do # bundle exec rake doc:rails generates the API under doc/api. gem 'sdoc', '0.3.20',require: false end # Use ActiveModel has_secure_password # gem 'bcrypt-ruby', '~> 3.0.0' # Use unicorn as the app server # gem 'unicorn' # Use Capistrano for deployment # gem 'capistrano', group: :development # Use debugger # gem 'debugger', group: [:development, :test] 
1
  • 1
    you should have quotes aroud version '2.0.0' Commented Jul 23, 2013 at 14:46

2 Answers 2

7

You should have

ruby '2.0.0' 

instead of

ruby 2.0.0 

in your Gemfile.

Sign up to request clarification or add additional context in comments.

Comments

2

I think you need quotes around the 2.0.0.

Something like ruby "2.0.0".

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.