【问题标题】:Rails_admin returns 500 on HerokuRails_admin 在 Heroku 上返回 500
【发布时间】:2019-08-05 15:05:26
【问题描述】:

我正在使用 rails 5.1, ruby​​ 2.3.3, rails_admin '~> 1.4', '>= 1.4.2'

虽然在开发环境中一切正常,但当我将代码推送到 Heroku 并转到 /admin 时,我得到:

很抱歉,出了点问题。 如果您是应用程序所有者,请查看日志以获取更多信息。

Heroku 日志:

2019-03-14T14:37:24.174624+00:00 app[web.1]: [26495061-dae1-4201-9940-b2fd9b2bbec3] vendor/bundle/ruby/2.5.0/gems/rails_admin-1.4.2/app/views/layouts/rails_admin/application.html.haml:9:in `_vendor_bundle_ruby_______gems_rails_admin_______app_views_layouts_rails_admin_application_html_haml___4595881635924699580_46923427520660'
2019-03-14T14:37:24.174626+00:00 app[web.1]: [26495061-dae1-4201-9940-b2fd9b2bbec3] vendor/bundle/ruby/2.5.0/gems/actionview-5.1.6.2/lib/action_view/template.rb:157:in `block in render'
2019-03-14T14:37:24.174628+00:00 app[web.1]: [26495061-dae1-4201-9940-b2fd9b2bbec3] vendor/bundle/ruby/2.5.0/gems/activesupport-5.1.6.2/lib/active_support/notifications.rb:168:in `instrument'
2019-03-14T14:37:24.174630+00:00 app[web.1]: [26495061-dae1-4201-9940-b2
2019-03-14T14:37:24.175890+00:00 heroku[router]: at=info method=GET path="/admin" host=geenyland.herokuapp.com request_id=26495061-dae1-4201-9940-b2fd9b2bbec3 fwd="41.66.209.190" dyno=web.1 connect=0ms service=562ms status=500 bytes=1827 protocol=https
2019-03-14T14:37:24.731676+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=geenyland.herokuapp.com request_id=bc9f2e56-9906-4571-9fb8-de437250f015 fwd="41.66.209.190" dyno=web.1 connect=0ms service=1ms status=200 bytes=143 protocol=https

【问题讨论】:

  • 上面的代码被修剪了
  • 您发布的日志中不包含实际的错误消息。
  • 你有一个status=500,这意味着有些东西坏了。运行heroku logs --tail 并检查出了什么问题。
  • @RickS 我运行 heroku logs --tail => 我得到了这个 =>
  • sock=client at=warning code=H27 desc="Client Request Interrupted" method=GET path="/" request_id=a64c4c6e-910b-4cf0-ab2d-ea87de829e5c fwd="197.251.240.135" dyno=web.1 connect=1ms service=175ms status=499 bytes=protocol=https

标签: ruby-on-rails ruby heroku production rails-admin


【解决方案1】:

我遇到了这个确切的问题,查看我的日志并没有给我太多帮助。但是,我对 Rails 很陌生,并且正在学习阅读日志以排除故障。 Jose 为official guide from Heroku for a rails project 发布的链接有帮助。一个简单的heroku run rake db:migrate 解决了我的问题。

【讨论】:

    猜你喜欢
    • 2016-02-14
    • 2021-10-17
    • 1970-01-01
    • 1970-01-01
    • 2019-10-05
    • 2015-08-21
    • 2015-03-09
    • 1970-01-01
    • 2021-07-27
    相关资源
    最近更新 更多