Heroku code=H10 desc=“App crashed” - Can't figure out why it's crashing

痞子三分冷 提交于 2019-11-30 11:11:18

Try following steps:

- git push heroku master # if not done
- heroku run rake db:migrate
- heroku restart

Wait couple of minutes...

In my case it was because I was hardcoding the port to be used,

I changed using this, and it worked

app.listen(process.env.PORT || 3000);

To create a heroku account

 $heroku create

To verify your git configration is well

$git remote -v

Associate a Git repo with an existing application

$heroku git:remote -a herokuapp-name

To perform push to master

$git push heroku master

To get your database to work you will have to migrate to production database

$heroku run bundle exec rake db:migrate

Then restart

heroku restart

finaly browse to your location

You need to to compile your assets locally. I usually run

bundle exec rake assets:precompile 

and then commit and push to heroku.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!