heroku : run rake db:migrate error

半世苍凉 提交于 2019-12-21 21:37:59

问题


Running `rake db:migrate` attached to terminal... failed
 !    Multiple apps in folder and no app specified.
 !    Specify app with --app APP.

I get the above error in my terminal when I try to run rake db:migrate can anyone please help?


回答1:


As the error clearly states, you need to specify which app you wish to run the command for. If you are inside of the project directory, you shouldn't need to specify the app. If you are outside of your projects folder run the command like so:

heroku run rake db:migrate --app <your-app-name>



回答2:


I've had this problem crop up where it wasn't related to heroku at at. If you really want to see, open up your .git/config file

For example, I was with staging and found I had the 2nd remote. Deleting this from my .git/config file fixed everything.

[remote "staging"]
    url = git@heroku.com:site-stage.git
    fetch = +refs/heads/*:refs/remotes/staging/*


来源:https://stackoverflow.com/questions/14003881/heroku-run-rake-dbmigrate-error

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