我一直在尝试重新部署我在Heroku上托管的应用程序 .
在每次重新部署时,我都会收到“您的应用已成功部署” .
但在打开页面时我得到了:
An error occurred in the application and your page could not be served.
Please try again in a few moments.
If you are the application owner, check your logs for details.
打开“活动”标签下的日志给了我日志,但它没有出现什么问题 .
如何才能知道导致应用程序错误的原因 .
我们可以从heroku shell轻松获取Heroku的日志 . 要在您的计算机上获取“heroku shell”,请安装heroku toolbelt .
一个安装,从'cmd'登录到heroku:
heroku login
然后你可以得到日志:
heroku logs --app APPNAME
无论您使用git,github还是dropbox,这都有效 .