Saturday, March 19, 2011

Setup a Rails 3 app on an EC2 quick start linux AMI

Just setup a Rails 3, Ruby 1.9.2 on a free ec2 micro instance (http://aws.amazon.com/free)
Started from the quick Basic 32-bit Amazon Linux AMI 2011.02.1 Beta AMI, I setup the following stack in less than 2 hours.
git
ruby 1.9.2
rubygem
MySQL
Apache
Passenger
And my Rails 3 app.

The whole process is mostly smooth. All dependencies can be found on yum.
It looks like that the free (for a year) micro EC2 instance is quite a valid solution for personal ruby projects.

4 comments:

  1. Have you used Heroku? If yes, how do you the compare the two wrt pet project usage?

    ReplyDelete
  2. Amen, I did take a look at Heroku. It's a very much controlled environment where you basically simply provide the code of your app, and Heroku will deploy it for you. So as you can imagine there are quite some limitations, or at least some work around needed (according to another ThoughtWorker who worked on Heroku). While in ec2, it is pretty much a linux box you own. Price wise though, Heroku basic plan(only one request a time, and limited resources) is always free. EC2 only gives you the first year free. Theoretically you can create a new account at the end of year, but we don't know when that promotion is going to end. I would say definitely take advantage of the 1 year free ec2 instance.

    ReplyDelete
  3. Anonymous5:21 PM

    I tried installing Ruby 1.9 on a 64-bit free micro instance, but when I say `yum list | grep ruby` I don't see it. Do you think it isn't available?

    ReplyDelete
  4. sorry for the late reply but I rvm took care ruby 1.9 for me.

    ReplyDelete