Recently I worked for a RoR project.
heroku login
heroku create app
heroku create will ask you the login and password, and then “create app” will create a new reposity in heroku.
And its name is generated randomly, for example: testproject
cd /path_to_app/
heroku git:remote -a testproject
and if we want to verify if the remote is added, use
git remote -v
here should be
heroku https://git.heroku.com/testproject.git (fetch)
heroku https://git.heroku.com/testproject.git (push)
use
git push heroku master
it will push code to Heroku. But I encountered a problem,that the terminal kept asking me the authentication.
I tried to key the username and password I used, but it failed. Finally, I found that
key
heroku auth:token
and what it shows is password,and username is left as empty.
heroku run rake db:migrate