Articles

Installing Ruby 1.9 from sources on Ubuntu

In Ruby, Ubuntu on July 28, 2009 by Matt Grande

I found a few posts on how to do this, and all of them over-complicate things. Here’s a simple, step-by-step method to install ruby 1.9.1 from source.

First, ensure that the latest stable version is still 1.9.1-p129. If it isn’t, make sure to change the appropriate file names.

Step 1: Download the source.
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p129.tar.gz

Step 2: Un-Tar
tar -zvxf ruby-1.9.1-p129.tar.gz

Step 3: Configure (aka, Make the makefile)
cd ruby-1.9.1-p129/
./configure

Step 4: Make
make

Step 5: Run the tests. This is optional if you hate tests.
make test

Step 6: Install Ruby
sudo make install

And that’s it! You’re done!

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

%d bloggers like this: