My take on the world of coding

My First Impression of Heroku

A little background

I started playing with Ruby about a year ago. I quickly installed the Rails gem and created my first website with it. Ryan Bates over at RailsCasts deserves all of the praise for getting me to the point of deployment quickly, watching his informative videos.

Experimenting with deployment

One of the recommendations from Ryan’s screencasts was using Heroku as a host for my project. I started researching the pricing, and I thought I understood that the cheapest deployment would cost around $40 per month. I decided that my first project, which was only going to be used by a few friends, did not warrant this expense.

I have a cloud server provided by Rackspace that I already use for some other projects, so I decided to deploy on my own server. I used Unicorn as the Rails server, but had nothing but trouble and slow response times. I had read about Phusion Passenger, but once again I misunderstood what I would be needing and thought that it would be an expensive option.

I started searching for an alternative and I found Site5, which supports Rails application deploment. So, I setup an account and pointed my domain to Site5. I can honestly say that I have never experienced as good of customer service as what is offered by Site5 before. Everytime I have a problem or get stuck, they are right there to help. I always use the chat option on their website, and I don’t think I have ever waited more than 30 seconds in the support queue.

There is one problem with Site5’s hosting at the moment though. They currently only offer Ruby 1.8.7 installations, which badly cripples gem usage in applications. They have been working to resolve this problem, and are supposed to have it taken care of in December of 2013 (this month). They are upgrading to Phusion Passenger 4.0, which supports multiple Ruby installations. When that upgrade is done, every application hosted will be able to have it’s own Ruby version specified.

What I know now

I was reading more last week about Passenger, and I figured out that only the “enterprise” version costs money. While it does have nice features, like rolling restarts, it is not a requirement to host an application. The basic version is actually free.

Until today I had been planning on moving my application back to my cloud server, if Site5 does not complete the upgrade this month. I was going to install the Pasenger server, and host the application there.

Enter Heroku

Today I setup this blog, as a requirement for the Tealeaf Academy: Intro to Rails course. One of the recommendations was to setup an Octopress blog. I chose to do that. Going through the setup/configuration docs on Octopress’s website, they gave instructions for deploying my blog to Heroku.

I decided, what the heck, lets give Heroku a shot. I am simply astounded at how easy it was to create and deploy a new application using the Heroku Toolbelt.

Here are the steps, as copied from http://octopress.org/docs/deploying/heroku/:

1
gem install heroku # AUTHOR'S NOTE: This is deprecated, use the Heroku Toolbelt instead.
1
heroku create
1
2
# Set heroku to be the default remote for push/fetch
git config branch.master.remote heroku
1
2
3
4
rake generate
git add .
git commit -m 'site updated'
git push heroku master

That’s it!

That is all I did, and my blog is live. One note though, Octopress apparently displays a blank page until you save your first post. (Fingers crossed on that one, this is my first post)


I know this post may look like an advertisement for these companies, but they have no idea I am posting this, nor are they giving me to do anything to do so. I find it incredibly helpful when people share their findings about different services, giving details and links. I wrote this post with the hope that I can help someone else.

Comments