Twitter Feed Popout byInfofru

Adventures in .NET Software Craftsmanship!

Installing Rails 3.0.7 on Ubuntu 10.10 (Maverick)

Recently I started reading “Learning Rails by Example” by Michael Hartl, and when going through the first chapters I learned the hard way that setting up Ruby and Rails on Ubuntu is not trivial.  So I decided, that for my own sanity, I should document the steps to get the latest version of Rails an Ubuntu environment up and running (Ruby 1.9.2 and Rails 3.0.7 at the time of publishing this blog).  I opted for not using RVM (Ruby Version Manager), which is a decision I expect to regret at some point, but I wanted to keep the process simple and limit the number of tools for an environment that is mainly going to be used for learning purposes.


Step 1 – Install Required Software

sudo apt-get install libxslt-dev libxml2-dev ssh
sudo apt-get install curl git-core build-essential 
sudo apt-get install zlib1g-dev libssl-dev libreadline5-dev
sudo apt-get install sqlite3 libsqlite3-dev

Step 2 – Uninstall Ruby and Rails
sudo gem uninstall rails
sudo apt-get purge ruby rubygems


Step 3 – Install Ruby 1.9.1 Full

sudo apt-get install ruby1.9.1-full


Step 4 – Install Ruby 1.9.2

tar -xvvf ruby-1.9.2-p180.tar.gz
cd ruby-1.9.2-p180
./configure && make && sudo make install


Step 5 – Install Rails

sudo gem update
sudo gem install rails --version 3.0.7
sudo gem install ruby-debug19 ruby-debug-base19 ruby-debug-base19x ruby-debug-ide19 ruby-debug-ide


Step 6 – Install SQLite3

sudo gem install sqlite3 sqlite3-ruby