我正在阅读 J.Morgan 的一本书 cucumber 和奶酪,而Rails小狗应用程序有问题。即,当我执行rails时,出现以下错误-

/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-3.2.1/lib/active_support/values/time_zone.rb:268: warning: circular argument reference - now
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:80:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'coffee-rails'. (Bundler::GemRequireError)
    from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
    from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
    from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
    from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
    from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
    from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
    from /home/iza/puppies/config/application.rb:7:in `<top (required)>'
    from /usr/local/lib/ruby/gems/2.2.0/gems/railties-3.2.1/lib/rails/commands.rb:53:in `require'
    from /usr/local/lib/ruby/gems/2.2.0/gems/railties-3.2.1/lib/rails/commands.rb:53:in `block in <top (required)>'
    from /usr/local/lib/ruby/gems/2.2.0/gems/railties-3.2.1/lib/rails/commands.rb:50:in `tap'
    from /usr/local/lib/ruby/gems/2.2.0/gems/railties-3.2.1/lib/rails/commands.rb:50:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'

P.S. 我没有在图书作者的网站上发布此问题,因为它似乎已经存在很长时间了:(

我的Gemfile
source 'http://rubygems.org'

gem 'rails', '3.2.1'

gem 'json_pure'
gem 'spruz'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3-ruby', :require => 'sqlite3'
gem 'will_paginate'
gem 'jquery-rails'

group :assets do
  gem 'sass-rails', '~> 3.2.4'
  gem 'coffee-rails', '~> 3.2.2'
  gem 'uglifier', '>= 1.2.3'
end

group :development, :test do
  gem 'rspec-rails'
end

group :test do
 gem 'page-object'
 gem 'rspec'
 gem 'cucumber'
end

我的路轨(4.2.5,3.2.1)

最佳答案

看来您尚未安装NodeJs

sudo apt-get install nodejs

应该管用 !!!

10-01 08:55