Eric Bergman-Terrell's Blog

Ruby on Rails: How to Install Ruby on Rails on Ubuntu 11.04
September 18, 2011

I am currently learning Ruby on Rails. The hardest part so far has been installing Rails on Ubuntu 11.04. Ruby on Rails is pre-installed on OSX, and can be easily installed on Windows (there is an installation program). But on Ubuntu, the install experience is dismal, to put it mildly.

I spent multiple hours reading various "How to Install Ruby on Rails on Ubuntu 11.04" pages and trying the instructions. Many were well-written and authored by experienced Rails gurus. Some of them partially worked. None of them completely worked.

However, I was eventually able to update one of them, add a fix for a javascript issue and get a fully working installation. Presumably the install instructions work until one of the components is updated in a breaking fashion, which must happen frequently.

I am truly puzzled at the Ruby on Rails Ubuntu installation experience. Indeed, I'm struggling for the proper words to describe the process. Abysmal? Inextricably wedged? A Kafkaesque nightmare?

It's clear that at least some ROR development is done on Ubuntu. But why isn't there a decent package that could be easily installed? Or even reliable manual installation instructions?

The following instructions work, as of this instant in history (September 18, 2011), when done on a virgin Ubuntu 11.04 install, running on VirtualBox.

  1. Install Ubuntu 11.04 (I installed the 32-bit version).
  2. Go to Administration / Update Manager and install all updates.
  3. Open a terminal window (BASH command shell).
  4. Copy and paste the following commands into the terminal window, one section at a time:

# Based on: http://stuffingabout.blogspot.com/2011/04/installing-rails-3-on-ubuntu-1104.html and 
# https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager

# Paste the following into a bash command shell, one section at a time.

sudo 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 autoconf

curl -L http://rvm.beginrescueend.com/releases/rvm-install-head > rvm-install-head

bash rvm-install-head
rm rvm-install-head

source ~/.bashrc

rvm install 1.9.2
rvm use 1.9.2 --default
rvm 1.9.2 --passenger
rvm 1.9.2

gem install passenger

sudo apt-get install libcurl4-openssl-dev

# Choose option 1 and go with defaults.
rvmsudo passenger-install-nginx-module

gem install rails

sudo apt-get install python-software-properties

sudo add-apt-repository ppa:chris-lea/node.js

sudo apt-get update

sudo apt-get install nodejs

mkdir rails_projects
cd rails_projects

rails new hello_world
cd hello_world

rails server

# Test the new web app by browsing to http://localhost:3000
Keywords: ruby, ruby on rails, ubuntu 11.04, dismal install experience, windows, OSX, VirtualBox, rvm, gem, sqlite, curl, bash, ROR

Reader Comments

Comment on this Blog Post

Recent Posts

TitleDate
EBTCalc (Android) Version 1.53 is now availableMay 19, 2024
Vault 3 Security EnhancementsOctober 24, 2023
Vault 3 is now available for Apple OSX M2 Mac Computers!September 18, 2023
Vault (for Desktop) Version 0.77 ReleasedMarch 26, 2023
EBTCalc (Android) Version 1.44 is now availableOctober 12, 2021
Vault (Desktop) Version 0.72 ReleasedOctober 6, 2021
EBT Compass is Now Available for Android DevicesJune 2, 2021