Ruby 1.9.1 package for CentOS/RHEL4

While I like CentOS/RHEL as a distro, it does tend to be out of date for a lot of packages; especially if that software isn’t considered fully stable. One package in particular is Ruby 1.9, which has many critical improvements (real threads!) compared to v1.8. After a lot of searching came up empty, I grabbed the RPM spec file from the OpenPKG project and ported it to CentOS/RHEL4.

Rather then providing the various binary packages, I’m just doing a src.rpm. Note that I enabled pthread support, which is likely to cause problems if you’re using the ruby-tcltk package on RHEL, so you may want to disable that in the %configure section.

ftp://sftp.mudynamics.com/pub/ruby1.9-1.9.1p129-3.src.rpm (SHA1: 31eea950044c972fd96bc46a7d5876c8616648f8)

Since there are a lot of incompatibilities between 1.9 and 1.8, this rpm does not replace the older ruby 1.8 package- the interpreter is installed as /usr/bin/ruby1.9 and all other directories/binaries are also versioned.

I haven’t tried yet, but you may be able to build this under CentOS/RHEL5 as well.

Anyways, you can build your binary rpm like so:
rpm -ivh ruby1.9-1.9.1p129-3.src.rpm
cd /usr/src/redhat/SPECS
rpmbuild -bb ruby-1.9.1.spec --target=i686 # edit to taste

Bookmark and Share