Installed Ruby 1.9.2 on my Centos 5.5 box

Or how I stopped hating and learned to love installing Ruby on Centos 5.5

I needed a recent ruby version for tracks. I need tracks because I feel I need to track a todo list. So I am going to run a trial on vialle.amber; my virt home webserv. (I am realizing I need a production and test web server stat. Only one now to serve both which isnt that professional..)

First I tried the beaten yum track. This is Ubuntu’s fault really; I am used to recent versions and apt-get goodness. This gave me 1.6.5 and 0.7 of gems. That didnt do. So I went back to the good old ways of compiling stuff yourself and was reminded of the good old days. This is the short version where I strip the “what the hell weird error is this again?” yelling

Got the source from and did the .configure; the make and the make install

This compiles but gives a zlib error with gems. This blogpost helps us with the solution

yum install zlib zlib-devel

cd /usr/local/src/ruby-1.8.5-p2/ext/zlib/
ruby extconf.rb –with-zlib-include=/usr/include –with-zlib-lib=/usr/lib
make install

After which we can install ruby gems; download it from the site (unpack, etc) and install using “ruby setup.rb”

Next I needed the mysql ruby gem; Mysql was installed but not the sources necessary for the gem to do its magic, so “yum install mysql-devel”
After thats in place, I could “gem install mysql” and all was ready to go

The lesson here? less relying on the package manager; more Old Skool compiling!
Also; WordPress should introduce subtitles agan. Subtitles are very very cool.

Published by Gert


Leave a Reply

Please log in using one of these methods to post your comment: Logo

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

Facebook photo

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

Connecting to %s

%d bloggers like this: