Compiling Ruby 1.8.6 on Ubuntu
July 17, 2007 @ 09:26 AM | posted by carmelyne
(last updated: 08.09.07)Lets do this quickly:
Note: This is not for an upgrade.
- cd /usr/src
- sudo wget http://rubyforge.org/frs/download.php/18421/ruby-1.8.6.tar.gz
- sudo tar -xvf ruby-1.8.6.tar.gz
- cd ruby-1.8.6
- sudo apt-get install build-essential
- ./configure
- make test
- make
- sudo make install
- ruby -v (# == ruby 1.8.6 (2007-03-13 patchlevel 0) [x86_64-linux])
- irb (# make sure irb works)
Then just do a quick update sweep for ubuntu:
- apt-get update
- apt-get dist-upgrade
UPDATE: Getting script/console to work
Error:
/usr/local/lib/ruby/1.8/irb/completion.rb:10:in `require’:
no such file to load – readline (LoadError)
Eeek now script/console won't work. So let's fix that. We'll go back to the archive and do the following:
- cd /usr/src/ruby-1.8.6/ext/readline
- ruby extconf.rb
- make
- sudo make install
Do I need a disclaimer? Hey! I was on my own too when I did this compile. ;p
[ Last updated: August 09, 2007 @ 05:16 PM ]
4 Responses to...
“Compiling Ruby 1.8.6 on Ubuntu”
Sorry, comments are closed for this article.




If you want to see how to compile related programs, such as Pound and Memcache, on Ubuntu, see http://mandhro.com/2007/01/11/edgy-on-rails-get-compiling/
Posted: July 20th, 2007 at 07:41 PM
Thanks, Zak. That's a very good article.
Posted: July 20th, 2007 at 08:00 PM
Hi,
I came to this page through a suggestion in the rails forum. My irb doesnt support history and the script/console doesn't work.
Following your suggestions for compiling, it went through fine. ruby is compiled and seems to be fine...
However, the original reason for which I started the whole process still remains. I still dont have history on irb and script/console still doesn't work.. :(
I am running Ubuntu Feisty Fawn on Core2Duo Hp 6710b.. any clues ??
regards raghav..
Posted: August 22nd, 2007 at 01:52 PM
Hi Raqhav,
Did you do the update part?
Carmelyne
Posted: August 22nd, 2007 at 03:43 PM