Developing Ruby on Rails on Ubuntu Lucid Lynx 10.04

Update: For Installing Ruby on Rails onto a Ubuntu Server (Lucid Lynx 10.04) goto this post

Developing for any Web Application can be helped by developing in the same environment as the deployment.  For me this means that running Ubuntu Desktop and deploying onto Ubuntu Server is a no brainer.  Most Ruby on Rails developers you’ll find today use a Mac and Textmate.  I learnt Ruby on Rails in the same scene, and Textmate is awesome.  It is yet to be matched by another text editor.

There are some things that I don’t like about Mac, or I guess I prefer about Ubuntu/Linux.  The procedure to install something on a Linux machine is so painless.  Ruby Gems works really well.  Xapian is a breeze to install on a linux machine, Postgresql installs with one command in less than 20 seconds!  The last time I installed Postgresql on a Mac (and had the development headers, so you can install the gem..) it took the good part of an hour.

We have now all been blessed with the latest LTS (long term support) Ubuntu release.  It is pleasant on the eyes, right out of the box!  It fast the fastest boot time I have seen (I have used WinXp, Vista, Win7, OSX)

I would be confident when I say almost all Ruby on Rails deployments are to a linux environment.  Probably Red Hat, but I prefer Ubuntu just because of the ease of use and my familiarity of it.  So to get yourself up and running on Ubuntu Desktop and Developing Ruby on Rails, follow below!

Install Java Using Synaptic Package Manager install sun-java6-jre

Install jEdit for Editing
Download and install jEdit
Configure jEdit as here
jEdit is a Cross-Platform text editor designed for Programmers.  It has plugin support and overall works really well.  It is no Textmate but I am yet to find something in the Linux land which comes as close.

Install required packages

sudo apt-get install build-essential git-core postgresql zlib1g-dev libssl-dev libreadline5-dev

The required packages for installing Ruby Enterprise, and Git thrown in for good measure.

Install Ruby Enterprise
Download ruby-enterprise-1.8.7-2010.02.tar.gz
tar xzvf ruby-enterprise-1.8.7-2010.02.tar.gz
./ruby-enterprise-1.8.7-2010.02/installer

Make ruby upgrades easier later

sudo ln -fs /opt/ruby-enterprise-1.8.7-2010.01 /opt/ruby-enterprise
sudo ln -fs /opt/ruby-enterprise/bin/gem /usr/bin/gem
sudo ln -fs /opt/ruby-enterprise/bin/irb /usr/bin/irb
sudo ln -fs /opt/ruby-enterprise/bin/rake /usr/bin/rake
sudo ln -fs /opt/ruby-enterprise/bin/rails /usr/bin/rails
sudo ln -fs /opt/ruby-enterprise/bin/ruby /usr/bin/ruby

Install Database

sudo apt-get install postgresql postgresql-server-dev-8.4

Install basic gems

sudo gem install postgres paperclip mongrel

Now start cutting code!

Posted on June 8, 2010 at 2:54 pm by Jordan Carter · Permalink
In: Ruby on Rails, Server Config · Tagged with: 

Leave a Reply