2011-10-29 13 views
0

Rails 3.1.1を実行していて、このコマンドを実行しているときにこのエラーが発生しています。明らかにRailsの新機能は、どんなヘルプにも感謝しています。rakeに問題がある

rake aborted! nilのための 未定義のメソッド `前提条件:NilClass

/Users/220040168/.rvm/gems/[email protected]/gems/rspec-rails-2.6.0/lib/rspec/rails/tasks/rspec.rake:3:in `<top (required)>' 
/Users/220040168/.rvm/gems/[email protected]/gems/rspec-rails-2.6.0/lib/rspec-rails.rb:10:in `load' 
/Users/220040168/.rvm/gems/[email protected]/gems/rspec-rails-2.6.0/lib/rspec-rails.rb:10:in `block in <class:Railtie>' 
/Users/220040168/.rvm/gems/[email protected]/gems/railties-3.1.1/lib/rails/railtie.rb:183:in `call' 
/Users/220040168/.rvm/gems/[email protected]/gems/railties-3.1.1/lib/rails/railtie.rb:183:in `block in load_tasks' 
/Users/220040168/.rvm/gems/[email protected]/gems/railties-3.1.1/lib/rails/railtie.rb:183:in `each' 
/Users/220040168/.rvm/gems/[email protected]/gems/railties-3.1.1/lib/rails/railtie.rb:183:in `load_tasks' 
/Users/220040168/.rvm/gems/[email protected]/gems/railties-3.1.1/lib/rails/engine.rb:396:in `block in load_tasks' 
/Users/220040168/.rvm/gems/[email protected]/gems/railties-3.1.1/lib/rails/application/railties.rb:8:in `each' 
/Users/220040168/.rvm/gems/[email protected]/gems/railties-3.1.1/lib/rails/application/railties.rb:8:in `all' 
/Users/220040168/.rvm/gems/[email protected]/gems/railties-3.1.1/lib/rails/engine.rb:396:in `load_tasks' 
/Users/220040168/.rvm/gems/[email protected]/gems/railties-3.1.1/lib/rails/application.rb:103:in `load_tasks' 
/Users/220040168/.rvm/gems/[email protected]/gems/railties-3.1.1/lib/rails/railtie/configurable.rb:30:in `method_missing' 
/Users/220040168/rails_projects/sample_app/Rakefile:7:in `<top (required)>' 
/Users/220040168/.rvm/gems/[email protected]/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load' 
/Users/220040168/.rvm/gems/[email protected]/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load_rakefile' 
/Users/220040168/.rvm/gems/[email protected]/gems/rake-0.9.2.2/lib/rake/application.rb:501:in `raw_load_rakefile' 
/Users/220040168/.rvm/gems/[email protected]/gems/rake-0.9.2.2/lib/rake/application.rb:82:in `block in load_rakefile' 
/Users/220040168/.rvm/gems/[email protected]/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling' 
/Users/220040168/.rvm/gems/[email protected]/gems/rake-0.9.2.2/lib/rake/application.rb:81:in `load_rakefile' 
/Users/220040168/.rvm/gems/[email protected]/gems/rake-0.9.2.2/lib/rake/application.rb:65:in `block in run' 
/Users/220040168/.rvm/gems/[email protected]/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling' 
/Users/220040168/.rvm/gems/[email protected]/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run' 
/Users/220040168/.rvm/gems/[email protected]/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>' 
/Users/220040168/.rvm/gems/[email protected]/bin/rake:19:in `load' 
/Users/220040168/.rvm/gems/[email protected]/bin/rake:19:in `<main>' 

ない私は、このコマンドを実行した最初の時間が、最初の時間、私はこのエラーを取得しています。

GEMFILE

source 'http://rubygems.org' 

gem 'rails', '3.1.1' 

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

gem 'sqlite3' 

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

group :test do 
    gem 'rspec', '2.6.0' 
    gem 'webrat', '0.7.1' 
    gem 'autotest', '4.3.2' 
    gem 'autotest-rails-pure', '4.1.0' 
    gem 'autotest-fsevent', '0.2.2' 
    gem 'autotest-growl', '0.2.4' 
end 


# Gems used only for assets and not required 
# in production environments by default. 
group :assets do 
    gem 'sass-rails', '~> 3.1.4' 
    gem 'coffee-rails', '~> 3.1.1' 
    gem 'uglifier', '>= 1.0.3' 
end 

gem 'jquery-rails' 

# To use ActiveModel has_secure_password 
# gem 'bcrypt-ruby', '~> 3.0.0' 

# Use unicorn as the web server 
# gem 'unicorn' 

# Deploy with Capistrano 
# gem 'capistrano' 

# To use debugger 
# gem 'ruby-debug19', :require => 'ruby-debug' 
+0

Railsのバージョンよりも新しいR​​Specのレールのバージョンにアップグレードしてみ?スタックトレース?また、プロジェクトで前提条件を検索し、このメソッドを呼び出すものがあるかどうかを確認します。 –

+0

あなたの答えにすべてを加えてください。 –

+0

また、Gemfileが役立つかもしれません、私はGemの依存関係のために同様のエラーがありました。 –

答えて

0

がこの問題に関連ルックスhttps://github.com/rails/rails/issues/1197 は2.6.0

+0

それで解決しました...アップデートを取得するためにgemlockファイルを再インストールして更新する必要がありました。私の宝石のバージョンを管理する上で今後の進歩はありますか?そして、助けてくれてありがとう! –

関連する問題