Installing Rails 3 on Ubuntu 11.04

One of the more challenging problems with the opensource world (and joys in my opinion) is the rate of change of the software and systems. Unfortunately it means that every year I seem to be having to learn new ways of installing the latest tools. Every 6 months when I install the latest Ubuntu and Rails, something needs hand holding. Here is my attempt to get Rails running on Ubuntu 11.04.

Firstly, credit goes to yasi8h from theKindOfMe blog – see the original post here

Below is a variation of the process outlined in the blog post, however I have changed things to make it work for a fresh Ubuntu 11.04 install.

Run the following in sudo/root

apt-get install curl git-core build-essential bison openssl libreadline5 libreadline5-dev zlib1g zlib1g-dev libssl-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libmysqlclient-dev mysql-client mysql-server autoconf

curl -L > rvm-install-head
bash rvm-install-head

Read and follow the instructions given as shell output after  rvm-install-head to edit your .bashrc. You will need to remove the return statement and wrap the whole code block in if’s and append the command to load the rvm into the shell environment. 

OR suggests running:

echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile

rvm install 1.9.2
rvm use 1.9.2 –default
rvm 1.9.2 –passenger
rvm 1.9.2
gem install passenger
apt-get install libcurl4-openssl-dev
rvmsudo passenger-install-nginx-module

gem install rails

rm rvm-install-head

5 thoughts on “Installing Rails 3 on Ubuntu 11.04

  1. Anonymous


    Thanks for the instructions. I have a question:

    rvmsudo passenger-install-nginx-module


    rvmsudo: command not found

    How do I get rvmsudo installed?



  2. Daniel


    In order to get the rvmsudo you must run the following command in sudo:

    'bash rvm-install-head'

    That will install rvm in multi-user mode which gives you rvmsudo.

    Hope this helps!

  3. Anonymous

    Hi Daniel,

    Actually I did run the command exactly as instructed.

    bash rvm-install-head

    but still don't have rvmsudo.

    Otherwise the script I wrote from your instructions seems to work, and I have Rails3 setup.

    Thanks for the help! The instructions were quite clear!

  4. George

    Hi, the instructions are given in the prompt after you install rvm. You can also run echo '[[ -s “$HOME/.rvm/scripts/rvm” ]] && . “$HOME/.rvm/scripts/rvm” # Load RVM function' >> ~/.bash_profile as per the instructions on

    I realise that it isn't necessarily clear in my description above and will update the post accordingly. Good luck and Thanks.


Comments are closed.