Hartl's rails tutorial completed works locally perfect. Heroku persists “We're sorry, but something went wrong.”

偶尔善良 提交于 2019-11-29 16:19:36

Sounds to me like you didn't load the schema into your heroku database. After deploying what happens when you do this:

heroku run rake db:schema:load

Note that sometimes if you're loading up a new app that has an already-established schema, running all the migrations isn't the best way to get the database to the state you want - you should use rake db:schema:load instead. Let me know if this gets your database correct.

After running it you can use heroku run console and then do console commands like User.all to make sure it knows that the users table exists etc.

Don't forget to restart your server after loading the schema, or running db:migrate. For heroku that'd be: heroku restart

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