2013-03-12 47 views
0

該應用程序似乎正在工作,但我在我的日誌中收到這些錯誤。此問題顯示在每個頁面加載的「/favicon.ico」,「/assets/application-34baf7d108c7408a8c110454dc57e8f6.js」和「/assets/application-e6b66fbbea8acd5eddb9fada1fa91c36.css」的日誌中。Heroku上的Rails 4應用程序,工作但日誌中出現錯誤

此外,這個問題不會發生在開發中,只在heroku上。我試着用「heroku run ruby​​ -v」來確認我正在運行「ruby 1.9.3p392(2013-02-22 revision 39386)[x86_64- linux下]」

2013-03-12T03:34:50+00:00 app[web.1]: I, [2013-03-12T03:34:50.307770 #2] INFO -- : Started GET "/favicon.ico" for 99.104.137.64 at 2013-03-12 03:34:50 +0000 
2013-03-12T03:34:50+00:00 app[web.1]: F, [2013-03-12T03:34:50.322285 #2] FATAL -- : 
2013-03-12T03:34:50+00:00 app[web.1]: ActionController::RoutingError (No route matches [GET] "/favicon.ico"): 
2013-03-12T03:34:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/bundler/gems/rails-f278deb712b1/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call' 
2013-03-12T03:34:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/bundler/gems/rails-f278deb712b1/actionpack/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call' 
2013-03-12T03:34:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/bundler/gems/rails-f278deb712b1/railties/lib/rails/rack/logger.rb:38:in `call_app' 
2013-03-12T03:34:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/bundler/gems/rails-f278deb712b1/railties/lib/rails/rack/logger.rb:21:in `block in call' 
2013-03-12T03:34:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/bundler/gems/rails-f278deb712b1/activesupport/lib/active_support/tagged_logging.rb:67:in `block in tagged' 
2013-03-12T03:34:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/bundler/gems/rails-f278deb712b1/activesupport/lib/active_support/tagged_logging.rb:25:in `tagged' 
2013-03-12T03:34:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/bundler/gems/rails-f278deb712b1/activesupport/lib/active_support/tagged_logging.rb:67:in `tagged' 
2013-03-12T03:34:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/bundler/gems/rails-f278deb712b1/railties/lib/rails/rack/logger.rb:21:in `call' 
2013-03-12T03:34:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/bundler/gems/rails-f278deb712b1/actionpack/lib/action_dispatch/middleware/request_id.rb:21:in `call' 
2013-03-12T03:34:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call' 
2013-03-12T03:34:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call' 
2013-03-12T03:34:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/bundler/gems/rails-f278deb712b1/activesupport/lib/active_support/cache/strategy/local_cache.rb:72:in `call' 
2013-03-12T03:34:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/bundler/gems/rails-f278deb712b1/railties/lib/rails/engine.rb:511:in `call' 
2013-03-12T03:34:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/bundler/gems/rails-f278deb712b1/railties/lib/rails/application.rb:96:in `call' 
2013-03-12T03:34:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/content_length.rb:14:in `call' 
2013-03-12T03:34:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/connection.rb:81:in `block in pre_process' 
2013-03-12T03:34:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/connection.rb:79:in `catch' 
2013-03-12T03:34:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/connection.rb:79:in `pre_process' 
2013-03-12T03:34:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/connection.rb:54:in `process' 
2013-03-12T03:34:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/connection.rb:39:in `receive_data' 
2013-03-12T03:34:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine' 
2013-03-12T03:34:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run' 
2013-03-12T03:34:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/backends/base.rb:63:in `start' 
2013-03-12T03:34:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/server.rb:159:in `start' 
2013-03-12T03:34:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/handler/thin.rb:16:in `run' 
2013-03-12T03:34:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/server.rb:264:in `start' 
2013-03-12T03:34:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/bundler/gems/rails-f278deb712b1/railties/lib/rails/commands/server.rb:80:in `start' 
2013-03-12T03:34:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/bundler/gems/rails-f278deb712b1/railties/lib/rails/commands.rb:80:in `block in <top (required)>' 
2013-03-12T03:34:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/bundler/gems/rails-f278deb712b1/railties/lib/rails/commands.rb:75:in `tap' 
2013-03-12T03:34:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/bundler/gems/rails-f278deb712b1/railties/lib/rails/commands.rb:75:in `<top (required)>' 
2013-03-12T03:34:50+00:00 app[web.1]: bin/rails:4:in `require' 
2013-03-12T03:34:50+00:00 app[web.1]: bin/rails:4:in `<main>' 

回答

3

我擺脫錯誤的,我這樣做,我的config/enviroments/production.rb

- config.assets.compile = false 
+ config.assets.compile = true 
1

作爲一種替代解決方案,你可以在本地編譯的資產,然後把它們發送到heroku ...

$ rake assets:precompile 
$ git add -A 
$ git commit -m 'compiled assets' 
$ git push heroku master 

我這樣做是作爲CI步驟的一部分

相關問題