Heroku Postgres Error: PGError: ERROR: relation “organizations” does not exist (ActiveRecord::StatementInvalid)

后端 未结 13 598
有刺的猬
有刺的猬 2020-11-27 14:27

I\'m having a problem deploying my Rails app to Heroku, where this error is thrown when trying to access the app:

PGError: ERROR: relation \"organiz

13条回答
  •  萌比男神i
    2020-11-27 14:50

    I had the same problem. To solve it, resetting the database is more easier.

    • heroku rake db:reset ('heroku run rake db:reset' if you're on cedar)
    • heroku rake db:migrate ('heroku run rake db:migrate' if you're on cedar)

    Then, migration was done successfully for my case :)

    While this is a good solution in this context, don't do it on production. It will delete all the records from your database

提交回复
热议问题