1

Addison Wesley Ruby On Railsの本に続いてチュートリアルを行っており、現在TDDについて学習しています。問題は、rspecをインストールした後にrakeを使用する際に問題が発生することです。「rakedb:migrate」を試した後、ターミナルから取得するものは次のとおりです。

    rake aborted!
undefined method `prerequisites' for nil:NilClass
/Users/Jay/.rvm/gems/ruby-1.9.3-p374/gems/rspec-rails-2.0.1/lib/rspec/rails/tasks/rspec.rake:3:in `<top (required)>'
/Users/Jay/.rvm/gems/ruby-1.9.3-p374/gems/rspec-rails-2.0.1/lib/rspec-rails.rb:10:in `load'
/Users/Jay/.rvm/gems/ruby-1.9.3-p374/gems/rspec-rails-2.0.1/lib/rspec-rails.rb:10:in `block in <class:Railtie>'
/Users/Jay/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.11/lib/rails/railtie.rb:184:in `instance_exec'
/Users/Jay/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.11/lib/rails/railtie.rb:184:in `block in load_tasks'
/Users/Jay/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.11/lib/rails/railtie.rb:184:in `each'
/Users/Jay/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.11/lib/rails/railtie.rb:184:in `load_tasks'
/Users/Jay/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.11/lib/rails/engine.rb:423:in `block in load_tasks'
/Users/Jay/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.11/lib/rails/application/railties.rb:8:in `each'
/Users/Jay/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.11/lib/rails/application/railties.rb:8:in `all'
/Users/Jay/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.11/lib/rails/engine.rb:423:in `load_tasks'
/Users/Jay/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.11/lib/rails/application.rb:145:in `load_tasks'
/Users/Jay/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.11/lib/rails/railtie/configurable.rb:30:in `method_missing'
/Users/Jay/rails_projects/sample_app/Rakefile:7:in `<top (required)>'
/Users/Jay/.rvm/gems/ruby-1.9.3-p374/bin/ruby_noexec_wrapper:14:in `eval'
/Users/Jay/.rvm/gems/ruby-1.9.3-p374/bin/ruby_noexec_wrapper:14:in `<main>'
(See full trace by running task with --trace)

rake10.0.3とrspec2.0.1を使用しています

4

1 に答える 1

1

この問題を修正するには、rspec-railsgemの新しいバージョンに更新する必要があります。

于 2013-01-28T16:34:39.793 に答える