Heroku Deploy Procedure

Just keep record of the procedure to deploy heroku install heroku heroku gem(deprecated) or toolbelt

1
2
3
sudo aptitude install heroku-toolbelt
#or for ubuntu
wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh

login with credentials

1
2
3
4
5
6
7
8
heroku login
#Enter your Heroku credentials.
#Email: adam@example.com
#Password:
#Could not find an existing public key.
#Would you like to generate one? [Yn]
#Generating new SSH public key.
#Uploading ssh public key /Users/adam/.ssh/id_rsa.pub

create app

1
2
3
heroku create
heroku rename
heroku help

add to git and make a commit

push and deploy

1
2
3
4
#change Gemfile put sqlite3 to development 
#add pg to production
#if you change Gemfile you need to git commit again otherwise heroku will not know
git push heroku master

if you got error

Permission denied (publickey). fatal: The remote end hung up unexpectedly

try and reference add keys to heroku

1
2
3
4
5
heroku keys:add ~/.ssh/id_rsa.pub
ssh-keygen -t rsa -f id_rsa
git clone git@heroku.com:stark-dawn-1234.git -o heroku
heroku keys:clear
heroku keys:add

migration and open

1
2
3
4
heroku run rake db:migrate
heroku run console
heroku logs
heroku open
Comments

Comments