2013-11-04 18 views
0

我在Heroku上有一個Rails應用程序,我不經常訪問。當我今天參觀它,我得到了標準的Rails錯誤信息如何查找heroku上的錯誤來源?

We're sorry, but something went wrong. 

我跑heroku logs,試圖找出問題是什麼,但日誌不說任何可以解釋的錯誤(對我來說) 。

你在這種情況下做什麼?

2013-11-04T22:52:07.048102+00:00 app[web.1]: Processing by PostsController#index as HTML 
2013-11-04T22:52:07.132891+00:00 app[web.1]: Rendered posts/_post.html.erb (13.2ms) 
2013-11-04T22:52:07.133396+00:00 app[web.1]: Rendered posts/_post.html.erb (0.3ms) 
2013-11-04T22:52:07.146333+00:00 app[web.1]: Rendered posts/_post.html.erb (0.5ms) 
2013-11-04T22:52:07.147977+00:00 app[web.1]: Rendered posts/_post.html.erb (0.3ms) 
2013-11-04T22:52:07.148485+00:00 app[web.1]: Rendered posts/_post.html.erb (0.4ms) 
2013-11-04T22:52:07.151556+00:00 app[web.1]: Rendered posts/_post.html.erb (0.5ms) 
2013-11-04T22:52:07.175334+00:00 app[web.1]: Rendered posts/_post.html.erb (12.5ms) 
2013-11-04T22:52:07.183576+00:00 app[web.1]: Rendered posts/_post.html.erb (0.5ms) 
2013-11-04T22:52:07.188420+00:00 app[web.1]: Rendered posts/_post.html.erb (0.5ms) 
2013-11-04T22:52:07.212161+00:00 app[web.1]: Rendered posts/_post.html.erb (0.5ms) 
2013-11-04T22:52:07.212742+00:00 app[web.1]: Rendered posts/_post.html.erb (0.4ms) 
2013-11-04T22:52:07.226959+00:00 app[web.1]: Rendered posts/_post.html.erb (0.5ms) 
2013-11-04T22:52:07.246992+00:00 app[web.1]: Rendered posts/_post.html.erb (0.5ms) 
2013-11-04T22:52:07.243411+00:00 app[web.1]: Rendered posts/_post.html.erb (0.5ms) 
2013-11-04T22:52:07.296351+00:00 app[web.1]: Rendered posts/_post.html.erb (0.5ms) 
2013-11-04T22:52:07.297843+00:00 app[web.1]: Rendered shared/_analytics.html.erb (0.0ms) 
2013-11-04T22:52:07.308385+00:00 app[web.1]: Rendered posts/_total.html.erb (0.7ms) 
2013-11-04T22:52:07.399532+00:00 app[web.1]: Rendered posts/index.html.erb within layouts/application (311.6ms) 
2013-11-04T22:52:07.399720+00:00 app[web.1]: Completed in 351ms 
2013-11-04T22:52:07.398061+00:00 app[web.1]: Rendered shared/_stats.html.erb (44.1ms) 
2013-11-04T22:52:07.429348+00:00 app[web.1]: Rendered vendor/plugins/exception_notification/lib/exception_notifier/views/exception_notifier/_title.text.erb (0.1ms) 
2013-11-04T22:52:07.429836+00:00 app[web.1]: Rendered vendor/plugins/exception_notification/lib/exception_notifier/views/exception_notifier/_session.text.erb (0.3ms) 
2013-11-04T22:52:07.428209+00:00 app[web.1]: Rendered vendor/plugins/exception_notification/lib/exception_notifier/views/exception_notifier/_request.text.erb (1.3ms) 
2013-11-04T22:52:07.430004+00:00 app[web.1]: Rendered vendor/plugins/exception_notification/lib/exception_notifier/views/exception_notifier/_title.text.erb (0.0ms) 
2013-11-04T22:52:07.737679+00:00 app[web.1]: Rendered vendor/plugins/exception_notification/lib/exception_notifier/views/exception_notifier/_backtrace.text.erb (0.2ms) 
2013-11-04T22:52:07.733934+00:00 app[web.1]: Rendered vendor/plugins/exception_notification/lib/exception_notifier/views/exception_notifier/_environment.text.erb (303.5ms) 
2013-11-04T22:52:07.734305+00:00 app[web.1]: Rendered vendor/plugins/exception_notification/lib/exception_notifier/views/exception_notifier/_title.text.erb (0.1ms) 
2013-11-04T22:52:07.741156+00:00 app[web.1]: Rendered vendor/plugins/exception_notification/lib/exception_notifier/views/exception_notifier/exception_notification.text.erb (314.7ms) 
2013-11-04T22:52:07.740339+00:00 app[web.1]: Rendered vendor/plugins/exception_notification/lib/exception_notifier/views/exception_notifier/_title.text.erb (0.1ms) 
2013-11-04T22:52:07.842689+00:00 app[web.1]: Sent mail to [email protected] (67ms) 
2013-11-04T22:52:07.842689+00:00 app[web.1]: 
+0

您是否收到帶錯誤報告的ExceptionNotification電子郵件? (它說它發送)你應該在那裏得到一個完整的堆棧跟蹤,以及你可以共享。 – jstim

+0

日誌說發送了一封電子郵件(我認爲我有一個電子郵件註冊在應用程序中),但我沒有得到一個,我必須配置它以某種方式發送它? – Leahcim

+0

exception_notification README顯示如何配置中間件,並添加收件人電子郵件地址。 https://github.com/rails/exception_notification/blob/master/README#L21 – jstim

回答

0

設置一個像Papertrail這樣的日誌加載項之一的免費版本。全部嘗試一下,看看你更喜歡哪一個。

如果你想要一個E-mail,我不認爲你可以通過Heroku的本身配置錯誤的電子郵件,但您可以使用Sendgrid的免費版本插件發送錯誤信息你自己在rescue區塊或rescue_from Exception, :with => :email_error_info在你的ApplicationController

+0

我安裝了它,它告訴我我發佈在OP中的同樣的東西。 – Leahcim

+0

您是否執行了相同的命令或操作來重現錯誤,然後*查看日誌?如果是這樣,你什麼都看不到,請確保你沒有在某個地方的「rescue」塊中吞下錯誤信息。 – Vidya

+0

是的,我是,和OP一樣的錯誤信息。 – Leahcim