2011-09-14 5 views
2

既存のアプリケーションをRails 3.1にアップグレードしますが、ページを表示しようとするときに次のエラーが発生します。Rails 3.1でアセットを提供するときにNoMethodErrorが発生する

私が手ログで

:私はすべてのCSSやJavaScriptの資産のことを得る

cache: [GET /assets/jquery.js?body=1] miss, store 
Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at Wed Sep 14 15:35:32 +0100 2011 
Served asset /jquery.js - 200 OK (0ms) 
[2011-09-14 15:35:32] ERROR NoMethodError: You have a nil object when you didn't expect it! 
You might have expected an instance of Array. 
The error occurred while evaluating nil.each 
/Users/jamessmith/.rvm/gems/ruby-1.8.7-p352/gems/rack-1.3.2/lib/rack/handler/webrick.rb:71:in `service' 
/Users/jamessmith/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' 
/Users/jamessmith/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' 
/Users/jamessmith/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' 
/Users/jamessmith/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/webrick/server.rb:162:in `start' 
/Users/jamessmith/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' 
/Users/jamessmith/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/webrick/server.rb:95:in `start' 
/Users/jamessmith/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/webrick/server.rb:92:in `each' 
/Users/jamessmith/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/webrick/server.rb:92:in `start' 
/Users/jamessmith/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/webrick/server.rb:23:in `start' 
/Users/jamessmith/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/webrick/server.rb:82:in `start' 
/Users/jamessmith/.rvm/gems/ruby-1.8.7-p352/gems/rack-1.3.2/lib/rack/handler/webrick.rb:13:in `run' 
/Users/jamessmith/.rvm/gems/ruby-1.8.7-p352/gems/rack-1.3.2/lib/rack/server.rb:265:in `start' 
/Users/jamessmith/.rvm/gems/ruby-1.8.7-p352/gems/railties-3.1.0/lib/rails/commands/server.rb:70:in `start' 
/Users/jamessmith/.rvm/gems/ruby-1.8.7-p352/gems/railties-3.1.0/lib/rails/commands.rb:54 
/Users/jamessmith/.rvm/gems/ruby-1.8.7-p352/gems/railties-3.1.0/lib/rails/commands.rb:49:in `tap' 
/Users/jamessmith/.rvm/gems/ruby-1.8.7-p352/gems/railties-3.1.0/lib/rails/commands.rb:49 
script/rails:6:in `require' 
script/rails:6 

。私はrake rails:updateを行うと、それを確認してくださいすること、との競合を発見したの各ファイルを更新しなければならなかった最後に

Internal Server Error 
You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil.each 
WEBrick/1.3.1 (Ruby/1.8.7/2011-06-30) at localhost:3000 

答えて

1

私は私が手ブラウザウィンドウで資産を表示しよう古いファイルと新しいファイルの違い。

関連する問題