我在heroku日志中遇到此错误。数据库已创建,但不断记录此错误
2013-01-31T18:06:06+00:00 heroku[run.9334]: Starting process with command `bundle exec rake db:migrate`
2013-01-31T18:06:06+00:00 heroku[run.9334]: Awaiting client
2013-01-31T18:06:06+00:00 heroku[run.9334]: State changed from starting to up
2013-01-31T18:06:02+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate` by overallduka@hotmail.com
2013-01-31T18:06:10+00:00 heroku[run.9334]: Client connection closed. Sending SIGHUP to all processes
2013-01-31T18:06:11+00:00 heroku[run.9334]: Process exited with status 0
2013-01-31T18:06:11+00:00 heroku[run.9334]: State changed from up to complete
2013-01-31T18:06:16+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=youimports.herokuapp.com fwd=189.73.162.46 dyno= queue= wait= connect= service= status=503 bytes=
答案 0 :(得分:0)
虽然在rake db:migrate
期间确实失败了,但您的日志不会显示postgres的任何问题。
我会验证DATABASE_URL
是否使用heroku config --app <your-app>
指向您的数据库。如果不是,只需推广您的数据库。为此,请通过heroku pg:info --app <your-app>
找出数据库的“颜色”,然后通过heroku pg:promote <color> --app <your-app>
进行宣传。