Pushing app to heroku problem - ruby-on-rails

I am trying to push my app to heroku and I get the following message:
$ heroku create
Creating electric-meadow-15..... done
Created http://electric-meadow-15.heroku.com/ | git#heroku.com:electric-meadow-1
5.git
$ git push heroku master
! No such app as fierce-fog-63
fatal: The remote end hung up unexpectedly
It's weird that I am getting this now, I have pushed the app to heroku many times without issue. the especially weird thing is, fierce-fog-63 is an old app that I made and deleted a long time ago. Why is it now that heroku is trying to push to this app that doesn't exist anymore, especially when I have created a new one? Any suggestions?

Type this and I think you'll see the problem:
git remote -v
Fix it like this:
git remote rm heroku
git remote add heroku git#heroku.com:electric-meadow-15.git

I was getting the second error you posted "failed to push some refs to 'git#heroku.com:floating-stone-94.git' " (with a different app name) and i got rid of it by doing the following:
git remote rm heroku
heroku create
you should see a line that says 'Git remote heroku added'. Also
git remote -v
should now have the correct app.

For all the people who this does not work, check your ~/.heroku/credentials
If the email or token does not match the account, you won't see your apps.

If you got here and think you have a similar problem but all of the other stuff suggested does not work you might want to try:
heroku restart

Related

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.
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

starting with heroku; fail updating rails app

after a few months learning a bit about rails and making some stuff local, I wanted to try to upload a simple rails app to heroku. Which, by the way, was a pain in the ass because of installing issues of Postgresql. But ok, that's done.
Now I create an app on heroku, I did the login, key thing, git, and uploaded. Was fine, very easy after all. I just uploaded an empty rails app, to try heroku.
Well, then I add a controller. Upload again via git push heroku master and not so fine! I did scaffold, for my articulo controller. And I wasn't able to open the URL once pushed to heroke on someurl/articulos. I got an 404 heroku message here: http://enigmatic-scrubland-8865.herokuapp.com/articulos
Then I create a controller for the home site and get rid of the "welcome aboard" default site. Again push heroku... On terminal I got messages all updated, and lauching. All fine.
But then I access and again, the "welcome aboard" default page.
Locally it works fine. But now I'm not sure if I'm doing it well. It scares me that no failing messages are to see nowhere, but obviously it fails.
After editing my rails app, I always do this:
$ git init
$ git add .
$ git commit -m "init"
$ git push heroku master
Like the documentation says on heroku. But, no error and no updating.
Thanks in advice.
From what I see from heroku devcenter, the git init part is only to be done on the first initial creation of the git repo, not "After editing my rails app".
In other words, you shouldn't have to "always do" a git init after editing your rail apps.
For the first push, I would recommend a:
git push -u heroku master
That way, all the subsequent push will be a simple:
git push

Ruby on Rails: Pushing to heroku - keys error

I have recently moved my app from a linux machine to windows, and I am trying to set it up with heroku again. There are problems with my keys, so I am just wanting to push the app up as a brand new app.
I do, git init, then git add ., then git commit -m "init", and now I do heroku create.
I want to just push my folder up to the new app cedar, but everytime I run git push heroku master is tries to push to the old one, and an error flags as my keys don't match.
Anyone have any ideas? Thanks
Execute heroku auth:logout to logout, then heroku auth:login to login again.
To read full help message, try
heroku help
heroku auth
It seems that you're calling heroku apps:create wrongly? Take a look at the documentation here.
Also, the deployment documentation might be more useful for you if you already have a git repository setup.

Trouble re(deploying) to heroku

I had trouble re-deploying the sample app from Hartls book:
! No such app as murmuring-beyond-6630.
So then I logged into Heroku, deleted the app and created another...
fatal: The remote end hung up unexpectedly
yuliya#ubuntu:~/rails_projects/sample_app$ heroku create
Creating cryptic-plains-9409... done, stack is cedar
http://cryptic-plains-9409.herokuapp.com/ | git#heroku.com:cryptic-plains-9409.git
yuliya#ubuntu:~/rails_projects/sample_app$ heroku keys:add
Found existing public key: /home/yuliya/.ssh/yuliya.pub
Uploading SSH public key /home/yuliya/.ssh/yuliya.pub... done
yuliya#ubuntu:~/rails_projects/sample_app$ git push heroku master
! No such app as murmuring-beyond-6630.
Still referenced previous app so I removed it using the git rm heroku command. Then I ran heroku create. Then tried to push the app again...
yuliya#ubuntu:~/rails_projects/sample_app$ git remote add heroku git#heroku.com:cryptic-plains-9409
yuliya#ubuntu:~/rails_projects/sample_app$ git push heroku master
! Invalid path.
! Syntax is: git#heroku.com:<app>.git where <app> is your app's name.
I am completely stuck and would appreciate any help here. I am brand new to this, and thank you for your time!
I believe you left off the .git, which is what the error is complaining about.
Try this,
git remote set-url heroku git#heroku.com:cryptic-plains-9409.git
git push heroku master
Referenced this question:
How does "git push heroku master" know where to push to and how to push to a different repo?

How to reset everything Heroku in my Git/Rails 3.1 Project

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 = git#heroku.com:adjective-noun-1234.git
fetch = +refs/heads/*:refs/remotes/heroku/*
This is what git tries to push to. Just change the line
url = git#heroku.com: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
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 git#heroku.com:sitename.git
This is a bit extreme, but worked for me....
heroku destroy appname
heroku create
git push heroku master

Resources