PDA

View Full Version : Installing Ruby on Linux


rob
May 26th, 2005, 10:09 PM
I'm sure there's many install instructions out there on Ruby, but I thought I'd write this mini-guide to cover some of the pitfalls I've found with certain distributions.

Fedora Core, CentOS, and Mandrake, Debian

On these distributions, I've found that compiling from source gives you the best results. The main reason for this is that the RPM's and deb's built for these platforms aren't up to date often times. Also, having the RPM "zlib-devel" (or "zlib1g-dev" for Debian) comes in handy, especially when it comes to installing RubyGems.

Installing Ruby (as root)

cd /usr/src
wget http://mirror.rubyforums.com/ruby/ruby-latest.tar.gz
tar xfz ruby-latest.tar.gz
cd ruby-1.8.2
./configure --prefix=/usr
make
make install

Note: You can use wget ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.8.2.tar.gz instead of the mirror.rubyforums.com that we've setup if you prefer. We have setup this mirror to always have the latest Ruby version.

Gentoo

Due to the nature of Gentoo, installing the latest version of Ruby is very easy. Just run:


emerge sync
emerge ruby
emerge rubygems


I'll be adding other distros to this soon, as well as help with installing Ruby Gems and such on them.

aquila
May 29th, 2005, 05:42 AM
A small addition:
in Gentoo installing Ruby gems is easy:
emerge rubygems
That can't be hard, right? :)

rob
June 1st, 2005, 09:51 PM
Added! Thanks Steve! :)

aquila
June 2nd, 2005, 03:04 AM
Added! Thanks Steve! :)

Did Steve edit my post? :)

rob
June 2nd, 2005, 10:00 AM
Oh no, he didn't. I'm sorry, I credited the wrong person! :(

Please accept my appologies!

aquila
June 2nd, 2005, 12:31 PM
Oh no, he didn't. I'm sorry, I credited the wrong person! :(

Please accept my appologies!

No problem, I'm not angry. It was even rather funny ;)