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!
Related
My c9.io site works very well but my heroku site gives "We're sorry, but something went wrong." after a few clicks. Is there a way to push my entire site to heroku instead of just changes? I'm hoping maybe that will fix it on the heroku side.
Thanks, Jon
Run these commands in the terminal.
git remote -v
git remote rm destination
after removing Heroku, add it again.
heroku create
git push heroku master
heroku run rake db:migrate
I haven't been able to get Heroku to update my app for some reason. This is the first app I've had problems with this happening. I've tried a couple different methods, but everything I've tried just says in the command "everything is up to date." and when I check heroku, it's just an early version of my app. Any idea why it won't update on Heroku?
Here is what I've tried:
$ bundle exec rake test
$ git add -A
$ git commit -m "..."
$ git checkout master
$ git merge blah
$ bundle exec rake test
$ git push
$ git push heroku
$ heroku run rake db:migrate
and I've also tried this as well:
$ git status
$ git add .
$ git commit -m "..."
$ git push heroku master
$ heroku run db:migrate
Heres the git status:
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
Here's trying to force it
$ git push heroku master --force
Everything up-to-date
Here's with git remote -v
heroku https://git.heroku.com/stupidapp1.git (fetch)
heroku https://git.heroku.com/stupidapp1.git (push)
origin https://github.com/Tyrantt47/stupidapp1.git (fetch)
origin https://github.com/Tyrantt47/stupidapp1.git (push)
Curtis, I feel like this answer could be judged as the antithesis of a good dev, but if you have the code you want to deploy checked into version control and locally, why not just push it to a new Heroku app.
If the name of the repository is any indication of the scale of the application, I would say try it and see the results.
Heroku provides good documentation on migrating a database from one app to another and its add-on services are easy to get setup, if either one of those are a concern.
Food for thought...
I think that the syntax is
git push -f heroku master
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>
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
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