我正在尝试遵循Ruby Tutorial(Michael Hartl)的书。我在Gemfile上得到了这个错误:41(前几步它在Gemfile:35):
Franciscos-MacBook-Pro:first_app franciscomello$ bundle install --without production
Undefined local variable or method `rb' for Gemfile
from /Users/franciscomello/Desktop/Aptana Studio 3 Workspace/First_app/Gemfile:41
我尝试了很多提示。例如,我有沙箱正确的输出:
Franciscos-MacBook-Pro:first_app franciscomello$ which ruby irb gem rake
/usr/bin/ruby
/usr/bin/irb
/usr/bin/gem
/usr/bin/rake
我已经调试了我的Gemfile,它看起来像这样:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.0'
# Use sqlite3 as the database for Active Record
gem 'sqlite3', '1.3.8'
# 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.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails', '3.0.4'
# 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
group :production do
gem 'pg', '0.15.1'
gem 'rails_12factor', '0.0.2'
end
#sugestao do Tutorial
gem rb-readline
答案 0 :(得分:5)
应该是
gem 'rb-readline'
如果没有引号,它会尝试将其解释为变量...特别是rb减去readline