0

我在 Heroku 上有一个我不经常访问的 Rails 应用程序。当我今天访问它时,我收到了标准的 Rails 错误消息

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 myemail@gmail.com (67ms)
2013-11-04T22:52:07.842689+00:00 app[web.1]: 
4

1 回答 1

0

设置一个免费版本的日志记录插件,如 Papertrail。试一试,看看你喜欢哪个。

如果你想要一封电子邮件,我不认为你可以通过 Heroku本身配置错误电子邮件,但你可以使用免费版本的 Sendgrid 插件将错误信息以rescue块或rescue_from Exception, :with => :email_error_info在你的ApplicationController.

于 2013-11-04T22:58:32.127 回答