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

后端 未结 13 618
有刺的猬
有刺的猬 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条回答
  •  醉酒成梦
    2020-11-27 14:59

    After hours of sifting through answer, I realized that when you specify

    rails new MYAPP -database POSTGRESQL
    

    it changes the .gitignore file, ignoring the entire /db/ directory, so my database was never getting pushed up to heroku. Remove it with caution, or at least don't have your username and password in there where you push up.

提交回复
热议问题