I solved my problem while writing this post, but I thought this might be good information for other noobs like me :)
To solve the problem below edit the following file .git/config
There's a section that looks like this
[remote "heroku"]
url = [email protected]:adjective-noun-1234.git
fetch = +refs/heads/*:refs/remotes/heroku/*
This is what git tries to push to. Just change the line
url = [email protected]:adjective-noun-1234.git
to whatever new Heroku project you created. Git should now be able to push to Heroku again.
I have gotten my second Rails app ever to a working state and want to deploy it. So I followed all the steps for Heroku deployment in the Ruby on Rails Tutorial (I had the deployment working for the sample app from the book) using:
heroku create
I then push my project with
git push heroku master
The project doesn't work although I can't find any errors in the Heroku logs, all I get is:
We're sorry, but something went wrong. We've been notified about this issue and we'll take a look at it shortly.
So I looked around the Heroku Support Section and found the official Rails 3.0 / 3.1 deployment guide:
http://devcenter.heroku.com/articles/rails3
http://devcenter.heroku.com/articles/rails31_heroku_cedar
I went to the Heroku Web Frontend > General Info > Destroy App because I wanted to continue my efforts with a clean slate.
Following the guide I created a Heroku project for the cedar stack:
heroku create --stack cedar
And push it to Heroku using
git push heroku master
THE PROBLEM: for some reason git is still trying to push to the old Heroku project!!!
resulting in an error
fatal: The remote end hung up unexpectedly
To deploy your app to Heroku, use the git push command to push the code from your local repository's main branch to your heroku remote. For example: $ git push heroku main Initializing repository, done.
Check your remote repositories, and update it to the new heroku name:
git remote -v
Then remove the heroku one that is wrong:
git remote rm heroku
Then add the new one
git remote add heroku [email protected]:sitename.git
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With