【问题标题】:heroku getting server errors - where can I find them in the log?heroku 出现服务器错误 - 我在哪里可以在日志中找到它们?
【发布时间】:2013-01-14 17:49:11
【问题描述】:

Ruby on Rails 应用名为“product9”

对于我正在获得的新功能的一个特定页面

We're sorry, but something went wrong.

我用

heroku logs --app product9 -n200

查看日志,但我看到的生成错误的页面只有:

2013-01-30T19:06:02+00:00 heroku[router]: at=info method=GET 
path=/medicaid host=product9.herokuapp.com fwd=173.14.167.133 dyno=web.1 queue=0
wait=11ms connect=31ms service=189ms status=500 bytes=643

注意状态 500。

我如何才能找到有关问题的详细信息,即如何找到更详细的错误消息?

仅供参考:我在本地下载了该应用程序,但没有收到该错误。我必须运行 rake db:migrate 但我也在 Heroku (heroku run rake db:migrate) 上完成了。

我已打开 Airbrake 和 Exceptional 并重新启动应用程序,但这似乎没有帮助或生成任何错误电子邮件。

【问题讨论】:

  • 您是否为您的应用打开了调试模式?
  • 最好的工具是什么?空气制动?新遗物?特殊?谢谢:)
  • 我尝试为此应用打开 Airbrake,但没有收到错误 - 它们是否通过电子邮件发送?
  • 堆栈跟踪可能还有更多内容。在您的应用程序目录中,只需运行 heroku logs 并查找错误。另外,自上次推送到 Heroku 后,您是否提交了任何更改?
  • @MichaelDurrant 您还可以使用 heroku logs -t 标志跟踪 Heroku 日志。

标签: ruby-on-rails heroku rake migrate


【解决方案1】:

答案是打开 Airbrake。

我还重新启动了服务器 (heroku server restart --app myapp)。

现在我得到了很多可以使用的有趣细节!喜欢:

Started GET "/medicaid" for 173.14.167.133 at 2013-01-30 20:45:38 +0000
2013-01-30T20:45:37+00:00 heroku[web.1]: State changed from starting to up
2013-01-30T20:45:41+00:00 app[web.1]:     5: 
2013-01-30T20:45:41+00:00 app[web.1]:     4:    - javascript_include_tag "fullcalendar", "medicaid"
2013-01-30T20:45:41+00:00 app[web.1]: 
2013-01-30T20:45:41+00:00 app[web.1]: ActionView::Template::Error (medicaid.css isn't precompiled):
2013-01-30T20:45:41+00:00 app[web.1]:     2:    - stylesheet_link_tag "medicaid"
2013-01-30T20:45:41+00:00 app[web.1]:     1: - content_for :stylesheets do
2013-01-30T20:45:41+00:00 app[web.1]:     3: - content_for :javascripts do
2013-01-30T20:45:41+00:00 app[web.1]:   app/views/medicaid/index.html.haml:2:in `block in _app_views_medicaid_index_html_haml__252759609716080826_41268600'
...

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-11-11
    • 2014-09-13
    • 2010-10-03
    • 1970-01-01
    • 1970-01-01
    • 2021-12-06
    • 2011-03-24
    相关资源
    最近更新 更多