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: and 

# 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 > 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

How to decompile Java code with JetBrains IntelliJ IDEA (2018.2.3, Windows 10)October 5, 2018
Java Programming Tip: SWT Photo Frame ProgramOctober 31, 2016
Vault 3 (Desktop) Version 1.63 ReleasedSeptember 9, 2016
"Compliance with Court Orders Act of 2016"April 9, 2016
Disable "Visual Voicemail" on Android / T-MobileJanuary 17, 2016
IPv6 HumorDecember 10, 2015
Java Programming Tip: Specify the JVM time zoneDecember 7, 2015