Hack hack hack...

An open journal-- some of it written for you, but most of it is for me.

Heroku

Before you start!

Keep in mind that heroku doesn’t work with sqlite. This should be changed out if you are going to use heroku and before you push. If you forget, you need to change out the sqlite3 gem for the pg gem. Commit and re-push.

1
2
git remote add heroku git@heroku.com:gearshare.git
fatal: remote heroku already exists.

See

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#this initializes the heroku repo
♕ heroku create <appname> #adding the app name will allow you to name it off the bat otherwise heroku will assign it to you... like below
Creating ancient-tor-4530... done, stack is cedar
http://ancient-tor-4530.herokuapp.com/ | git@heroku.com:ancient-tor-4530.git
Git remote heroku added

#check to see what remotes I've set up
♕ git remote -v
heroku    git@heroku.com:ancient-tor-4530.git (fetch)
heroku    git@heroku.com:ancient-tor-4530.git (push)
origin    https://github.com/ajonas04/*appname*.git (fetch)
origin    https://github.com/ajonas04/*appname*.git (push)

# need to remove heroku so that I can rename it
♕ git remote rm heroku

#add new name
♕ git remote add heroku git@heroku.com:*appname*.git

I was missing this command:

1
heroku run rake db:migrate

as outlined in the rails3 basics here…

See how to point domains to your heroku project here.

Linking Local Branches to Remote Apps:*

Heroku is designed only to accept pushes from master. In order to push from a feature branch you need to do something like this:

1
♕ git push heroku branch_name:master

This says push branch named ‘branch_name’ to heroku but call it master. Explanation

Also look at rake tasks for heroku… its on the rake task post…

Pushing the seed file to heroku

1
♕ heroku run rake db:seed

Comments