2012-10-21 69 views
0

我一直在試圖讓這個應用程序正確部署到Heroku一天以上,並解決了一個錯誤之後,我被困在這一個。Heroku Missing Template Error RoR

我被送達We're Sorry something went wrong 500錯誤,我有以下日誌:

2012-10-21T17:40:32+00:00 app[web.1]: [2012-10-21 17:40:32] INFO WEBrick 1.3.1 
2012-10-21T17:40:32+00:00 app[web.1]: [2012-10-21 17:40:32] INFO ruby 1.9.2 (2011-07-09) [x86_64-linux] 
2012-10-21T17:40:32+00:00 app[web.1]: [2012-10-21 17:40:32] INFO WEBrick::HTTPServer#start: pid=2 port=18894 
2012-10-21T17:40:33+00:00 heroku[web.1]: State changed from starting to up 
2012-10-21T17:41:55+00:00 heroku[web.1]: State changed from up to starting 
2012-10-21T17:41:57+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 44537` 
2012-10-21T17:41:58+00:00 heroku[web.1]: Stopping all processes with SIGTERM 
2012-10-21T17:41:58+00:00 app[web.1]: /usr/local/lib/ruby/1.9.1/webrick/server.rb:90:in `select' 
2012-10-21T17:41:58+00:00 app[web.1]: [2012-10-21 17:41:58] ERROR SignalException: SIGTERM 
2012-10-21T17:41:59+00:00 app[web.1]: => Booting WEBrick 
2012-10-21T17:41:59+00:00 app[web.1]: => Rails 3.2.0 application starting in production on http://0.0.0.0:18894 
2012-10-21T17:41:59+00:00 app[web.1]: => Call with -d to detach 
2012-10-21T17:41:59+00:00 app[web.1]: => Ctrl-C to shutdown server 
2012-10-21T17:41:59+00:00 app[web.1]: 
2012-10-21T17:41:59+00:00 app[web.1]: 
2012-10-21T17:41:59+00:00 app[web.1]: Started GET "/" for 86.9.116.69 at 2012-10-21 17:41:59 +0000 
2012-10-21T17:42:00+00:00 app[web.1]: 
2012-10-21T17:42:00+00:00 app[web.1]: ActionView::MissingTemplate (Missing template /404 with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :coffee, :haml]}. Searched in: 
2012-10-21T17:42:00+00:00 app[web.1]: * "/app/app/views" 
2012-10-21T17:42:00+00:00 app[web.1]: * "/app/vendor/bundle/ruby/1.9.1/gems/rails_admin-0.1.2/app/views" 
2012-10-21T17:42:00+00:00 app[web.1]: * "/app/vendor/bundle/ruby/1.9.1/gems/kaminari-0.14.1/app/views" 
2012-10-21T17:42:00+00:00 app[web.1]: * "/app/vendor/bundle/ruby/1.9.1/gems/devise-2.1.2/app/views" 
2012-10-21T17:42:00+00:00 app[web.1]:): 
2012-10-21T17:42:00+00:00 app[web.1]: app/controllers/application_controller.rb:10:in `render_404' 
2012-10-21T17:42:00+00:00 app[web.1]: 
2012-10-21T17:42:00+00:00 app[web.1]: 
2012-10-21T17:42:00+00:00 app[web.1]: cache: [GET /] miss 
2012-10-21T17:42:00+00:00 heroku[router]: GET secure-ocean-9819.herokuapp.com/ dyno=web.1 queue=0 wait=0ms service=340ms status=500 bytes=643 

一切完美的作品在本地主機上,所以我很困惑,爲什麼它似乎是在Heroku上掙扎。

任何幫助的人能真正提供將不勝感激:)

回答

0

你有方法/措施 - render_404在應用控制器,它具有代碼來處理404分發布

2012-10-21T17:42:00+00:00 app[web.1]: app/controllers/application_controller.rb:10:in `render_404' 

你可以嘗試在生產模式下本地運行應用程序。在生產模式下,應用程序首先加載所有類並引發異常(如果有的話)。

如果您只是想運行測試,您可以註釋掉該操作。

相關問題