Heroku 应用程序崩溃
我刚刚将 RoR 应用程序部署到 Heroku,并且该应用程序在我的本地端口上运行,但是当我访问 Heroku 地址时,我得到:
应用程序崩溃 此应用程序暂时离线。如果你是 此应用程序的管理员,请检查您的 heroku 日志以获取 回溯。
这可能是我在日志中发现的错误:
2011-02-25T17:08:25-08:00 heroku[router]: Error H10 (App crashed) -> GET afternoon-warrior-452.heroku.com/ dyno=none queue=0 wait=0ms service=0ms bytes=0
2011-02-25T17:08:25-08:00 heroku[router]: Error H10 (App crashed) -> GET afternoon-warrior-452.heroku.com/favicon.ico dyno=none queue=0 wait=0ms service=0ms bytes=0
How do I fix this?
I've just deployed my RoR app to Heroku, and the app works on my local port, but when I visit the Heroku address I get:
App crashed This application is temporarily offline. If you're the
administrator of this app, please check your heroku logs for the
backtrace.
This may be the error that I found in the logs:
2011-02-25T17:08:25-08:00 heroku[router]: Error H10 (App crashed) -> GET afternoon-warrior-452.heroku.com/ dyno=none queue=0 wait=0ms service=0ms bytes=0
2011-02-25T17:08:25-08:00 heroku[router]: Error H10 (App crashed) -> GET afternoon-warrior-452.heroku.com/favicon.ico dyno=none queue=0 wait=0ms service=0ms bytes=0
How do I fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我的猜测是您忘记设置生产数据库。也许...
$ heroku rake db:setup
或$ heroku rake db:push
...需要吗?更新:啊哈!根据评论中的错误消息,
application_helper.rb 中存在未解决的合并冲突。
这就是那些<<<<<<<<<
行是,由 git (或者可能是您正在使用的某些本地 SCCS)插入的内容,通常会指出分支和本地更改之间的冲突。从“git status”开始,然后在编辑器中查看
application_helper.rb
。My guess is that you forgot to set up the production database. Perhaps...
$ heroku rake db:setup
or$ heroku rake db:push
...is needed?Update: Aha! Going by your error message in the comment, you have an unresolved merge conflict in
application_helper.rb.
That's what those<<<<<<
lines are, something inserted by git (or perhaps some local SCCS you are using) that usually point out conflicts between a branch and local changes.Start with "git status" and also just look at
application_helper.rb
in your editor.$ heroku logs --app app_name
可能会给你一些继续的机会,但不要期望太多。日志非常稀疏。您可以使用 Exceptional 附加组件来获取更多信息。还有“日志记录”附加组件,我还没有尝试过,但可能对您有帮助。
另请注意当您向 Heroku 执行
git Push
时收到的消息。确保所有 gem 都安装正确。$ heroku logs --app app_name
might give you something to go on, but don't expect too much. The logs are pretty sparse.You could use the Exceptional add-on to maybe get some more info. There is also the "Logging" add-on, which I have not tried yet, but might be of help to you.
Also pay attention to the messages you get when you do your
git push
to Heroku. Make sure that all of your gems are installing properly.