Ruby, Temporarily "Broken" via Upstream

Updated July 6, 2008
Fedora Ruby is Working again, as of ruby-1.8.6.230-4 (Released July 3, 2008). The following can now be disregarded, but is being kept online for reference/archival purposes.
 

 

OK, so it seems the Matz Ruby Team has borked the Ruby Interpreter.  Again.  This blunder has trickled down to most mainstream Linux distributions, and started affecting Fedora 9 as of June 25 (ruby-1.8.6.230).

What's the Problem?
The original problem is a security issue discovered by someone at Apple.  Zed Shaw has a great in-depth analysis of what the underlying problems are, if you're interested in the gory details. 

In a nutshell, someone found a bug, made a quick patch, and broke pretty much everything else.  On my Fedora 9 development box, ruby-1.8.6.230 causes segfaults when I run Rails and try to hit the first page.  That's not good.

The Quick Fix (Fedora 9)
Obviously, you don't want a vulnerable machine floating out on the Internet, but you still need to get things done, too!  The quick-fix is to revert to ruby-1.8.6.114 that was distributed earlier with Fedora 9, and hope for a more recent version of ruby in the near future that doesn't have this problem.

Grab the following RPMs (substitute for 32-bit architecture if necessary):

 Then REINSTALL Ruby (execute these commands from the directory where you downloaded the above RPMs):

yum remove ruby ruby-devel ruby-libs rubygem-rails rubygem-mongrel
yum localinstall ruby-1.8.6.114-1.fc9.x86_64.rpm \ 
ruby-devel-1.8.6.114-1.fc9.x86_64.rpm \
ruby-irb-1.8.6.114-1.fc9.x86_64.rpm \
ruby-libs-1.8.6.114-1.fc9.x86_64.rpm \
ruby-rdoc-1.8.6.114-1.fc9.x86_64.rpm \
rubygem-rails rubygem-mongrel

If all went well, you will have Ruby 1.8.6.114 installed, and you can work as before.  If you're paranoid, you could add the above Ruby RPMs to the Yum Exclude list, but I'm pretty sure this is a temporary hiccup that'll be solved in another week or so.  We just need to let the upstream Ruby guys figure out a better solution that doesn't break everything.

The Hard Fix (Fedora 9)
A more viable alternative I'm experimenting with is using a different Ruby Interpreter.  Rubinius, or JRuby come to mind.  I'm looking into it, and will blog about it if I come up with a solid solution.