我一直试图弄清楚当我部署到heroku时出现的错误 - 我收到错误:
If you are the application owner check the logs for more information.
关于heroku。
当我查看日志时,这是我的输出:
2014-12-04T19:11:39.601769+00:00 heroku[api]: Enable Logplex by ***@gmail.com
2014-12-04T19:11:39.601769+00:00 heroku[api]: Release v2 created by ***@gmail.com
2014-12-04T19:13:04.540163+00:00 heroku[api]: Release v3 created by **@gmail.com
2014-12-04T19:13:04.540163+00:00 heroku[api]: Set LANG, RAILS_ENV, RACK_ENV, SECRET_KEY_BASE config vars by **@gmail.com
2014-12-04T19:13:05.567740+00:00 heroku[api]: Set DATABASE_URL config vars by **@gmail.com
2014-12-04T19:13:05.567772+00:00 heroku[api]: Release v4 created by **@gmail.com
2014-12-04T19:13:05.646074+00:00 heroku[api]: Attach HEROKU_POSTGRESQL_IVORY resource by **@gmail.com
2014-12-04T19:13:05.646104+00:00 heroku[api]: Release v5 created by **@gmail.com
2014-12-04T19:13:06.061846+00:00 heroku[api]: Scale to web=1 by **@gmail.com
2014-12-04T19:13:06.164666+00:00 heroku[api]: Release v6 created by **@gmail.com
2014-12-04T19:13:06.164619+00:00 heroku[api]: Deploy 8dabf8a by **@gmail.com
2014-12-04T19:13:12.044424+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 3629 -e production`
2014-12-04T19:13:15.049430+00:00 app[web.1]: [2014-12-04 19:13:15] INFO WEBrick 1.3.1
2014-12-04T19:13:15.049452+00:00 app[web.1]: [2014-12-04 19:13:15] INFO ruby 2.0.0 (2014-11-13) [x86_64-linux]
2014-12-04T19:13:15.049770+00:00 app[web.1]: [2014-12-04 19:13:15] INFO WEBrick::HTTPServer#start: pid=2 port=3629
2014-12-04T19:13:15.467086+00:00 heroku[web.1]: State changed from starting to up
2014-12-04T19:13:45.069127+00:00 heroku[router]: at=info method=GET path="/" host=infinite-sands-2102.herokuapp.com request_id=22e2e81b-39d4-4d63-9a30-b0b2c99aedc3 fwd="122.161.16.112" dyno=web.1 connect=3ms service=322ms status=500 bytes=1754
2014-12-04T19:13:45.878115+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=infinite-sands-2102.herokuapp.com request_id=8f5605ee-e29f-447a-a788-f553ab2f2ddb fwd="122.161.16.112" dyno=web.1 connect=1ms service=13ms status=404 bytes=1829
所以状态在最后两行中从500变为404,但网站在本地呈现完美,但我可以在heroku上看到500,然后是'/'上的404
可能是什么问题?
谢谢!
答案 0 :(得分:1)
Heroku日志只是说你的应用在' /'上产生500错误根路由,公共目录中没有favicon .ico(404,找不到文件)。
也许您必须首先将Rails 4设置为STDOUT(因此Heroku可以打印它们) https://devcenter.heroku.com/articles/rails4#logging-and-assets