问题
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