Cannot run rake db:migrate, relation does not exist

前端 未结 2 514
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-14 09:53

I am trying to get a working app to work on linux 10.04 running on vagrant

I installed all relevant gems, installed postgresql 9.1.9 and when I am trying to run

2条回答
  •  攒了一身酷
    2021-01-14 10:39

    Just trying to check on the obvious here, but have you tried running rake db:drop? Whenever I make changes to my migrations, I need to drop all of my DB tables before I try to create and migrate them.

    So the full operation would be rake db:drop db:create db:migrate

    Oh, and you can also try to specify the environment (I sometimes need to do that on test environments), e.g. rake RAILS_ENV=test db:drop db:create db:migrate

提交回复
热议问题