Posts Tagged ‘ Deployment ’

First deployment to Heroku

I’ve decided to use the Heroku Ruby on Rails hosting service due to it’s simplicity and integration with source control (git).  You can read more about it here.  There are many other services available, but I was attracted by the free account and also deployment is done in terminal like this:

 git push heroku master 

And creating a heroku account is done with this command:

heroku create tinyfireant

(Note: tinyfireant is the name of the site that you’re creating with Heroku)

Now one problem that I ran into was deployment, I kept getting this error:

git push heroku master

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

After scouring the web for a few hours I finally gave up at 1am yesterday.  But I woke up this morning and couldn’t go to work without at least giving it another chance.  And wouldn’t you know it, 10 minutes later my site was deployed.  Thanks to this post here I discovered that I hadn’t uploaded my ssh keys (this is basically a certificate that faciliates terminal communication with Heroku without having to log in each time I interact with the service.)

So I regen’d my keys and uploaded them to heroku like this:

cd ~/.ssh

ssh-keygen -t rsa -C ""

heroku keys:add

git push heroku master

(Note: I didn’t enter a different file name, and left my passphrases empty.)

Then I saw this lovely message:

Counting objects: 73, done.
Delta compression using 2 threads.
Compressing objects: 100% (63/63), done.
Writing objects: 100% (73/73), 80.86 KiB, done.
Total 73 (delta 10), reused 0 (delta 0)

—–> Heroku receiving push
—–> Rails app detected
Compiled slug size is 80K
—–> Launching……… done deployed to Heroku

* [new branch]      master -> master

Success! Now that I have deployment setup, I can start learning some more and deploying with 1 command line.  Hey Microsoft, you listening? :0)