Archive for the ‘CentOS’ Category
Installing Ruby Enterprise Edition on CentOS 5.2
Installing Ruby 1.8.6 on CentOS is not as easy as you would hope. The YUM repositories do not have anywhere near the latest version of ruby so you are forced into installing from source, which means locating and installing many dependancies before building ruby itself.
I have found myself building ruby several times on a new CentOS box after realizing that i had missed a dependancy that was required to use rails or some other ruby component.
I was going to write up a step by step guide to installing Ruby 1.8.6, Rails, MySql, etc… on CentOS 5.2 (and i may still do this) however i have found that the guys who wrote Phusion Passenger have also build a version of Ruby that as well as having a lower memory footprint has a convenient installer that takes the pain out of building from source.
Here are my steps for installing Ruby Enterprise Edition on CentOS 5.2
* 1. ssh into CentOS using your favorite ssh client.
* 2. cd /usr/local/src
(this is where I downloaded the source to you can do this anywhere i guess)
* 3. sudo wget http://rubyforge.org/frs/download.php/41040/ruby-enterprise-1.8.6-20080810.tar.gz
(this is the latest version at the time of writing this post)
* 4. tar xzvf ruby-enterprise-1.8.6-20080810.tar.gz
* 5. sudo ./bin/ruby-enterprise-1.8.6-20080810/installer
The last step starts the convenient installer process that will build everything you need from sources.
I found that first time the script ran i didn’t have MySql or PostgreSQL development header files so i installed them using
* sudo yum install postgresql-devel.i386
* sudo um install mysql-devel.i386
After running the install script again it completed with no errors (you could have just ran the gem install again rather than installing the whole of ruby…)
The great thing about this installer is that it isolates the installation and does not touch any system files so it will not screw up any of your existing ruby installs.
We have been using Ruby Enterprise Edition on one of our projects for a few weeks now and i have to say that it works really well, and it also includes the recent security patches for ruby - sweet!
Oh don’t let the name put you off Ruby Enterprise Edition is actually Open Source - Yay
