Friday, October 28, 2011

Ruby on rails on EC2 in 20 minutes

I wound up with an extra 20 minutes the other day, so I looked to see how hard it would be to set up a rails server on an EC2 instance.

Answer: very not hard.

I haven't done much with rails in the past (One week of code with my brother looking over my shoulder.)

I grabbed the RubyStack 2.3-0 Dev (Ubuntu 10.04) AMI from http://bitnami.org/stack/rubystackrails.

Once it initialized, I ssh'ed in and ran:
rails new blog
cd blog
I followed the directions here to edit the gemfile, then ran:

rake db:create
rails server
Tada! Instant rails server.


PS - Yes, yes I know about heroku.  In this case, building the app as an EC2 AMI is an essential part of the project. I want non-programmers to be able to clone the instance, and sharing a public AMI makes things pretty easy.

No comments:

Post a Comment