Search code examples
ruby-on-railsruby-on-rails-4herokudestroy

Heroku app removal


Rails 4 application.

Using Cloud9 editor (Not AWS)

Question: I was getting several errors in my Heroku app when I tried to push my completed work. It was showing a Segmentation fault error. My mentor suggested I delete and recreate the app and try to redeploy. Like the noob that I am, I deleted the application from my Heroku repository instead of destroying it in my Rails console. I proceeded to with a heroku create command and created a new app. However, when I went to git push heroku master it references the old app and gives a fatal: repository 'https.....' not found error.

How do I destroy the old app when the repository is still referenced/embedded in my code. Any suggestions would be greatly appreciated.


Solution

  • from your command line, execute heroku apps:destroy

    if it doesn't work, check your Git remote repository list by executing git remote -v

    if there is "heroku" in the one of the list, then delete it by git remote rm heroku

    and then create new Heroku app as what you do usually