Saturday, January 23, 2010

What's up with Ruby?

I recently hosed a partition and so decided to do a fresh Gentoo install in it. Luckily I mount /home on a different place. I also advocate a separate /usr/local, /var and /boot.

This leaves you with all your earlier work outside of a distribution. Independent. The separate /boot has some security implications.

But on to the subject. I didn't really care about X at that point and just emerged everything right up to and including Ruby. Updating and adding support for what I wished by emerge -uvp and adding 'USE="" emerge pkgname' when satisfied. Ruby installed fine. 1.8.7_pre(?) IIRC I did nothing outside of portage to this point.

When I tried to emerge -pv rubygems with mysql support it errored out failing to build the first package needed 'activesupport'. This is the way I remembered it.

I believe the requirement was for 'minitest' and it was masked. So I did a source install of this test lib.

Now activesupport fails with a different error. Emerge would not let it build. A gem install of activesupport succeeded. Their was another that required me to do a gem install activerecord iirc. This left me with some weird behaviour.

At one point the system went to power saving mode and came back to a screen with corrupted characters. On a reboot it acquired a dhcp address outside my localnet.
I will be rebooting a Knoppix disk and dd /dev/zero /dev/sda(?) (gentoo partition)
then repeat with /dev/one before a re-install.

While I was rather ticked off by a gentoo developers curt reply to a comment on I do understand some of the reasoning. However I am not real happy that doing a source install of any program outside of portage can break portage usage for an application. A clearer explanation of why is that on linux at least Ruby could be a bad thing. So I do understand why. As Flameeyes has posted there is risk in installing Ruby Gems outside portage.

Tip: It is in general a bad thing to include USE flags globally. I recommend including the minus ones in /etc/make.conf and things such as your desktop environment such as 'gnome' or 'kde' for finer grained control-
mdkir /etc/portage
mkdir /usr/local/etc && mkdir /usr/local/etc/portage
nano /usr/local/etc/portage/package.use and add support for what you wish here on a per package basis
ln -sf /usr/local/etc/portage/package.use /etc/portage/package.use