So I like Ruby the language but my two biggest problems are 1) it's slow, and 2) since it's a less popular language, it has less bindings.
Anyways, this came to head today. Problem 1 is pretty much solved with Ruby 1.9, which is now not slow, so yeah! However, not all the not large collection of bindings ruby has have been ported to 1.9, and if they have they haven't necessarily made it into package managers yet.
So far I'm writing off Ubuntu for the moment (it's ruby and ruby-mysql are out of date), maybe 9.10 will have the latest packages, or maybe I'll get back to it and compile them all :(, but it's not too important since the project I'm working on will run on my Gentoo server anyway so that's where it's most important to get everything working. So!
To get Ruby 1.9.1 on Gentoo, you need to use the Ruby Overlay, so install layman, and make sure your copy of subversion is compiled with either webdav_neon or webdav_serf so that it can get subversion repositories over http. Then install the ruby overlay
#layman -a ruby
From there you need to unmask dev-lang/ruby in /etc/portage/package.unmask and then you can install it. It will also install the eselect module for configuring ruby 1.8 and ruby 1.9 on your system. Once it's installed, select Ruby 1.9
# eselect ruby --list Available Ruby profiles: [1] ruby18 * [2] ruby19 (with Rubygems) # eselect ruby --set 2 Successfully switched to profile: ruby19
Yeah! However I needed mysql support under ruby, which comes from the mysql-ruby package (when online, this is not to be confused with the ruby-mysql package, from the same website, but different and not what you want :/ ).
Sadly, the portage version of mysql-ruby is an old 2.7.something and the overlay version is 2.8, but the only thing that works with ruby 1.9 is 2.8.1. So we need to set that up. Make a copy of the ebuild and edit it in the overlay
# cd /usr/portage/local/layman/ruby/dev-ruby/mysql-ruby
# cp mysql-ruby-2.8.ebuild mysql-ruby-2.8.1.ebuild
// Edit the new ebuild in your preferred editor and comment out
// line 28 that looks like
// epatch "${FILESDIR}/${P}-test.patch"
// we don't need the patch anymore
# ebuild mysql-ruby-2.8.1.ebuild digest
And now you have an ebuild for the latest version of mysql-ruby which works with ruby 1.9 so go ahead and install it. Hopefully shortly the ebuild will make the overlay. It's all just a matter of time really. This is just a transition period hack.






