我下面on Rails的教程Hartl的红宝石,和上午在本教程的为什么我的Gemfile不能运行?
当建立一个Rails应用程序,它说要运行这些命令:
cd first_app_direcory
sublime Gemfile
bundle update
的sublime Gemfile
命令编辑的Gemfile明显,但是当我尝试运行命令bundle update
我收到以下错误:
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
^
我拿着这两个线条勾勒出的Gemfile的,即使它说,包括他们。另外,我尝试了Ruby 1.9.3,并且仍然收到相同的错误消息。
ruby 2.0.0
#ruby-gemset=railstutorial_rails_4_0
将这些线条取出后,它就起作用了。我试图让它与gemfile中的那些行一起工作。我怎样才能做到这一点?
这是一个完整的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]
你应该引用aroud版本'2.0.0' –