Posts Tagged ‘ ruby on rails ’

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 "myEmailAddressRegisteredWithHeroku.com"

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
http://tinyfireant.heroku.com deployed to Heroku

To git@heroku.com:tinyfireant.git
* [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)

Learning Ruby on Rails from a .net developer perspective: Part I of N

I played with Ruby on Rails exactly one year ago and was very impressed with the thoughtful design, architecture and tooling that the platform provided.  I used to think that asp.net Mvc 2 would really hit the mark in filling in the gaps between mvc1 and RoR.  Well, I’ve been using Mvc2 on a project at work and I can truly say that it’s not as well thought out as it needs to be.  Couple this with my lack-luster experience that I’ve had in using bizspark and interacting with their team (found here and here) I decided to once again begin learning Ruby on Rails.

This is going to be an impromptu series that will just highlight little tidbits that I found useful and feel other .net developers may benefit from.  I guess you could say that this is a series highlighting my ignorance and will make a few of the ruby guys chuckle from time to time.