After renaming my heroku app from the heroku website, whenever I cd to its directory in a terminal and run any heroku command, I get App not found
. Does anybody know of a way to remedy this?

- 3,814
- 5
- 34
- 56

- 4,138
- 8
- 34
- 51
-
might be of some help http://stackoverflow.com/questions/4383670/how-to-change-a-ruby-on-rails-application-name – Hishalv Sep 30 '11 at 20:45
-
thanks, @Hishalv. i think that thread has to deal more with Rails apps being renamed, not necessarily from heroku though. i'm looking for some help that's specific to renaming an app on heroku. – Connor Sep 30 '11 at 20:51
-
This may also be helpful: http://stackoverflow.com/questions/5305843/getting-started-not-with-heroku-app-not-found – Kev Oct 02 '11 at 14:53
6 Answers
Try to update the git remote for the app:
git remote rm heroku
git remote add heroku git@heroku.com:yourappname.git

- 29,283
- 9
- 49
- 85
-
2can rename apps from cli: `$ heroku apps:rename newname` docs: https://devcenter.heroku.com/articles/renaming-apps – Connor Leech Jun 11 '14 at 18:32
-
@ConnorLeech allegedly yes, but actually that doesn't seem to work. – John LaBarge Sep 05 '14 at 11:43
-
@JohnLaBarge Yup, I just arrived at this answer because a rename from the CLI left me with "app not found" when I tried to do anything afterwards. – Matt Gibson Dec 16 '14 at 14:37
The Answer by James Ward is also correct, alternatively try doing this:
1). open a terminal
2). Go to your_app_directory/.git/config
3). Once you open the config file then edit as follows:
Change
url = git@heroku.com:old_app_name.git
to
url = git@heroku.com:new_app_name.git
Obviously substituting your apps old name to its new name. Hope it helps Also checkout this link renaming from cli - heroku

- 3,052
- 3
- 29
- 52
-
+1 Yeah, James' answer is correct, but for some reason I liked yours better. Thanks :) – Brian Wylie Jan 25 '14 at 22:46
-
+1 for renaming link and finding the command `heroku apps:rename newname` – Pakman Feb 06 '14 at 07:03
From the Heroku docs...
If you rename from the website ... [your app] will need to be updated manually:
git remote rm heroku
heroku git:remote -a newname

- 2,371
- 2
- 26
- 32
There is another way, you can fix it by renaming the app to the original name via web.
To find out the old name use heroku command line:
> heroku rename newname
which will spit out the old name. Use the old name to rename the app via web. You can check if renaming success by running
> heroku info
Once done you can rename to the preferred name by using
> heroku rename preferredname

- 6,042
- 2
- 31
- 41

- 61
- 1
- 1
James Ward's solution didn't work for me. I had to enter my git url in a different format:
git remote rm heroku
git remote add heroku https://git.heroku.com/appname.git

- 1,081
- 1
- 15
- 27