Skip to content

Installing Rails on free Amazon EC2 Micro

Mark Dunne edited this page Aug 24, 2013 · 2 revisions

This is how I setup and ran Rails on Amazon's free EC2 instance.

  1. I signed up here: Amazon Elastic Compute Cloud (EC2)
    FYI, requires credit card.

  2. I created a new instance and chose the default Amazon Machine Image (AMI) which ran Linux x86_64.
    The RSA login key was generated and downloaded to my local machine.
    I used the default configuration options for free Micro instance.

  3. I had to wait about a minute for the address for the instance to show up in the EC2 Management window.
    Address was ec2-xxx-xxx-xxx-xxx.us-west-2.compute.amazonaws.com

  4. Connect: ssh -i downloaded_rsa_login_key.pem [email protected]

  5. sudo yum update for the 10 to 20 security updates.

  6. Test: ruby -v outputs ruby 1.8.7 (2012-02-08 patchlevel 358) [x86_64-linux]
    Remove: `sudo yum erase ruby' (This is probably optional)

  7. Install dependencies: sudo yum install readline-devel git make zlib-devel sqlite-devel.x86_64 gcc g++ svn
    I added gcc,g++, and svn for a more flexible environment.

  8. Install RVM and latest stable Ruby: curl -L https://get.rvm.io | bash -s stable --ruby
    RVM Homepage

  9. Install rails: `gem install rails'

    One hour later...and done.

Versions:
rvm -v => rvm 1.14.11 (stable) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/]
ruby -v => ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
gem -v => 1.8.24
rails -v => Rails 3.2.7


05 August 2012
Clone this wiki locally