I've been walking through railstutorial.org trying to deploy my first rails app and have been banging my head trying to figure out all the setup stuff. This should all really be a one-click thing, update to newest ruby/newest rails, setup git and you're good to go, but it's a HUGE headache. Sorry I had to vent.
My error comes when I try to push to heroku while I'm in the current directory of my test app first_app:
XXXXXX-Computer:first_app XXXXXX$ git push heroku master
fatal: The remote end hung up unexpectedly
Searching the error led me to https://git.wiki.kernel.org/index.php/GitFaq#Git_push_fails_with_.22fatal:_The_remote_end_hung_up_unexpectedly.22.3F
which suggests that my public key may not be installed correctly. I have been able to push to a git repo fine and checking my heroku keys spits out my public key as expected:
XXXXXX-Computer:first_app XXXXXX$ heroku keys
=== 1 key for XXXXXX#gmail.com
ssh-rsa AAAAB3NzaC...u4iGALvQ== XXXXXX#gmail.com
My only deviation from the tutorial is that I'm using ruby 1.8.7/rails 3.03 because I was having some trouble with ruby version manager rvm. I could update ruby to 1.9.2, but when I went to check the rails version, I got this:
XXXXXX-Computer:first_app XXXXXX$ rails -v
/Library/Ruby/Site/1.8/rubygems.rb:779:in `report_activate_error': Could not find RubyGem rails (>= 0) (Gem::LoadError)
from /Library/Ruby/Site/1.8/rubygems.rb:214:in activate'
from /Library/Ruby/Site/1.8/rubygems.rb:1082:ingem'
from /usr/bin/rails:18
This is my first time using git and rvm as well, so I apologize if it's a basic question. I've been trying at this for a while and haven't been making that much progress for what should be a simple thing. I really appreciate any help the collective genius of stackoverflow can offer. Thank you in advance.
Heroku would tell you if it were a key issue. That error sounds more like a git/network issue.
Heroku occasionally has issues with pushing, which you can monitor here: http://status.heroku.com/. When it happens, all you can do is wait and try again later.
It could also be your config for the heroku remote. Could you post the output of git remote show heroku to be sure?
As for upgrading, it shouldn't affect you here. Gems are specific to the version of ruby you installed them for so if you upgrade to 1.9 you'll have to reinstall your gems. That's why rails had an error on 1.9.
So...nothing really suggested it in any of the tutorials, but logging into heroku from the terminal solved the seg fault problem and got my app up:
heroku login
Email: ******
Password: ******
git push heroku master
Yay!
It seems that you cannot add code snippets in comments and that new lines are not done with the enter key. That and a slower connection right now may have caused me to send you multiple email notifications.
Anyways, thank you for your response and clarification about the gems error. Here is the ouput of git remote show:
heroku
origin
and git remote show heroku:
fatal: The remote end hung up unexpectedly
The same error.
If it helps at all, I just cd'd to that directory and checked my .git/config file and saw:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
[remote "origin"]
url = git#github.com:XXXXXX/first_app.git
fetch = +refs/heads/*:refs/remotes/origin/*
[remote "heroku"]
url = git#heroku.com:stark-galaxy-XXX.git
fetch = +refs/heads/*:refs/remotes/heroku/*
Checking heroku info:
XXXXXX-Computer:first_app XXXXXX$ heroku info
=== stark-galaxy-XXX
Web URL: http://stark-galaxy-XXX.heroku.com/
Git Repo: git#heroku.com:stark-galaxy-XXX.git
Dynos: 1
Workers: 0
Stack: bamboo-ree-1.8.7
Addons: Shared Database 5MB
Owner: XXXXXX#gmail.com
I just tried deleting my app, uninstalling heroku, then trying again. I manually updated a git remote as per http://docs.heroku.com/renaming-apps#manually-updating-a-git-remote:
XXXXXX-Computer:first_app XXXXXX$ git remote rm heroku
XXXXXX-Computer:first_app XXXXXX$ git remote add heroku git#heroku.com:quiet-mountain-XXX.git
And checked that it was added by:
XXXXXX-Computer:first_app XXXXXX$ git remote -v
heroku git#heroku.com:quiet-mountain-XXX.git (fetch)
heroku git#heroku.com:quiet-mountain-XXX.git (push)
origin git#github.com:XXX/first_app.git (fetch)
origin git#github.com:XXX/first_app.git (push)
but continue to get:
XXXXXX-Computer:first_app XXXXXX$ git remote show heroku
fatal: The remote end hung up unexpectedly
XXXXXX-Computer:first_app XXXXXX$ git push heroku master
fatal: The remote end hung up unexpectedly
Related
I am trying to get into my rails heroku database. Usually I just run:
heroku run rails console
but it's giving me an error: bash: rails: command not found
I have no idea what caused this. Haven't updated my project code.
heroku --version
heroku-toolbelt/3.36.5 (x86_64-darwin15) ruby/2.2.4
heroku-cli/5.6.14-b0cc983 (darwin-amd64) go1.7.4
=== Installed Plugins
heroku-redis#1.2.8
The same happened to me. My problem was that I didn't commit my changes before the first push, so I didn't have the project up. I did:
git add .
git commit -m "first commit"
git push origin heroku
then, before trying rails c, you need to setup the database.
heroku run rake db:migrate
I followed this devcenter.heroku: getting started with rails4
I am new on Ruby/Rails application development. I already love Ruby/Rails because it's easy to learn. I've built an Rails application and i try to deploy on Heroku.
When i type :
heroku create
Creating app... done, stack is cedar-14
https://aqueous-plateau-17182.herokuapp.com/ | https://git.heroku.com/aqueous-plateau-17182.git
I don't have the following message :
Git remote heroku added
I think there is a problem with my remote :
git remote -v
heroku git#bitbucket.org:pracede/hubapp.git (fetch)
heroku git#bitbucket.org:pracede/hubapp.git (push)
origin git#bitbucket.org:pracede/hubapp.git (fetch)
origin git#bitbucket.org:pracede/hubapp.git (push)
git config --list | grep heroku
remote.heroku.url=git#bitbucket.org:pracede/hubapp.git
remote.heroku.fetch=+refs/heads/*:refs/remotes/heroku/*
1.There are remote but heroku refers to bitbucket. Is it correct ?
If no correct, how to do, please ?
I cannot deploy. I have the following message :
git push heroku master
Everything up-to-date
My rails application is not alive. Is someone could explain me, please ?
Thanks
First delete the current remote heroku reference(i.e pointing to bitbucket remote ) with -
git remote rm heroku
Add then add heroku remote to your repo -
git remote add heroku git#heroku.com:aqueous-plateau-17182.git
Hope this helps!
I am trying to learn Ruby on Rails by using the Ruby on Rails tutorial.
Every time I type the command git push heroku master, I get the following error message:
ssh: heroku: no address associated with name
fatal: Could not read from remote repository.
What should I do?
Your heroku remote isn't configured properly. It should look something like
git#heroku.com:something-weird-1234.git (fetch)
git#heroku.com:something-weird-1234.git (push)
Log into Heroku and see what your App is called. Then update your configuration like so:
git remote set-url heroku git#heroku.com:<app-name-copied-from-heroku>
git remote set-url --push heroku git#heroku.com:<app-name-copied-from-heroku>
I have been trying to push my first simple app to heroku for deployment. However, after ensuring the right gem files are installed (PG for Postgres), and having the proper login credentials on heroku and installing heroku on my Mac, it gives me the following message each time I attempt to upload it. How can I solve this issue so I can upload my code.
My-MacBook-Air:jrv JRV$ heroku login
Enter your Heroku credentials.
Email: ------k#gmail.com
Password (typing will be hidden):
Authentication successful.
My-MacBook-Air:jrv JRV$ git push heroku master
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
When i try the --verbose command i get the following:
Joses-MacBook-Air:jrv JRV$ git push heroku master --verbose
Pushing to git#heroku.com:tranquil-beyond-7774.git
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
When i try Heroku Keys and Keys:Add, I got the following response again
my-MacBook-Air:jrv JRV$ heroku keys
=== kwikteck#gmail.com Keys
ssh-rsa AAAAB3NzaC...+Q2oPy1mCf kwikteck#gmail.com#github.com
ssh-rsa AAAAB3NzaC...PTa++gCorp kwikteck#gmail.com#github.com
my-MacBook-Air:jrv JRV$ heroku keys:add
Found existing public key: /Users/JRV/.ssh/github_rsa.pub
Uploading SSH public key /Users/JRV/.ssh/github_rsa.pub... done
my-MacBook-Air:jrv JRV$ git push heroku master
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
my-MacBook-Air:jrv JRV$
I am currently running Rails 4.0.0, ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin10.8.0], with heroku-toolbelt/3.2.3 (x86_64-darwin10.8.0) ruby/1.9.3
It seems that you're not sending the right public key to Heroku to verify your identity.
You can try running git push heroku master with the --verbose option and see which publickey is really sent.
Try
heroku keys:add
in your app directory
Found the answer using the suggestions here and I did the following:
1) Went to https://devcenter.heroku.com/articles/keys
2) After using the heroku keys:add command to ensure the keys were uploaded and
3) getting no result, I deleted the keys in place using $ ssh-add -D
4) I created a new key using $ ssh-keygen -t rya ; it will ask for a password for the key for security
5) Added the keys back to Heroku using $ heroku keys:add
6) It will ask which key set you wish to you use, I choose the new key made by my system
7) After it accepted I checked using $ heroku keys
8) Then I was able to $ git push heroku master --verbose
System accepted the upload
My git console:
Home#PC /c/rails/konkurranceportalen (master)
$ git push heroku master
Enter passphrase for key '/c/Users/Home/.ssh/id_rsa':
! No such app as warm-spring-423
fatal: The remote end hung up unexpectedly
Home#PC /c/rails/konkurranceportalen (master)
I have created a app named "vinderhimlen" that I want to push my rails app to
you need to change your remote heroku (if you typed git remote -v youd still see warm-spring-423) try something like this:
git remote rm heroku
git remote add heroku git#heroku.com:vinderhimlen.git