Friday, May 23, 2014

fixing "no such app as" error in heroku deployment after application rename

I did few changes in my toy project and pushed it to heroku with

1git push heroku master
but got this error:
1!  No such app as myOldApplicationName.
2 
3fatal: Could not read from remote repository.
4 
5Please make sure you have the correct access rights
6and the repository exists.
I googled a bit to see that this is due to my application rename in heroku website. The previous name was "myOldApplicationName". Then I searched my .git directory to see if there are references to the old application name. I found it under "config".
1[remote "heroku"]
2 url = git@heroku.myOldApplicationName.git
Edit it with your new application to fix the issue.
1[remote "heroku"]
2 url = git@heroku.com:myNewApplicationName.git