“Installing Ruby on Rails on Ubuntu 10.04”

linux, rails, Uncategorized

There are a few different approaches to installing Ruby on Rails on Ubuntu 10.4. This is the technique that I use, in my opinion it involves the least hassle.


Ubuntu has a managed ruby package that serves perfectly as the basis for a Ruby on Rails installation. Open a console and install it with the following command.


sudo apt-get install ruby-full build-essential


I’ve previously had issues with the rubygems Debian package and would normally advocate installing the package directly from RubyForge.


cd ~
mkdir gems
cd gems
wget http://rubyforge.org/frs/download.php/70696/rubygems-1.3.7.tgz
tar -xf rubygems-1.3.7.tgz
cd rubygems-1.3.7
sudo ruby setup.rb


The ruby setup script doesn’t automatically place a link to the gems application in your /usr/bin folder so add it now.


sudo ln -s /usr/bin/gem1.8 /usr/bin/gem


Update your ruby environment. If you’ve downloaded the latest version of rubygems, you’ll be told that everything is already up-to-date.


sudo gem update system
gem -v


With your ruby environment ready, install rails.


sudo gem install rails


You’re finally at the point where you can create rails projects, just use the following command.


rails test_project


I prefer to use something a bit more friendly than vi as a development environment for Rails. Download and install the latest copy of Netbeans from netbeans.org.


wget http://download.netbeans.org/netbeans/6.9/final/bundles/netbeans-6.9-ml-linux.sh
chmod +x netbeans-6.9-ml-linux.sh
./netbeans-6.9-ml-linux.sh
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s