我在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]:
答案 0 :(得分:0)
设置其中一个日志加载项的免费版本,例如Papertrail。全力以赴,看看你喜欢哪个。
如果您需要电子邮件,我认为您不能通过Heroku 本身配置错误电子邮件,但您可以使用免费版本的Sendgrid插件来通过rescue
块或rescue_from Exception, :with => :email_error_info
中的ApplicationController
向您自己发送错误信息。