What’s Hot – my.dsu.ca

I heard a rumor that my.dsu.ca had been featured in this year’s Maclean’s Guide To Canadian Universities. Deciding to check this out, I came across the following in the “Campus Confidential: Straight from the Students” section of the Dalhousie University Entry:

What’s Hot

…Student union website my.dsu.ca for news and information about local events and campus societies.

It’s nice to know that something I have put a great deal of time into was worth mentioning by students to MacLean’s.

FreeBSD, Ruby And The Case Of The Failing Gems

The server I happen to host some of my stuff (ie. this site) happens to be running FreeBSD. In most cases, this doesn’t cause any problems. However, in the case of installing certain ruby gems, I would get an error when compiling native extensions. In particular, with the fastthread gem (I was trying to upgrade Mongrel), I received the output:

make install
/usr/bin/install -c -o root -g wheel -m 0755 fastthread.so /home/ssmith/gems/gems/fastthread-
install: /home/ssmith/gems/gems/fastthread- chown/chgrp: Operation not permitted

I received a similar error a while back when trying to install mongrel, and at the time I had asked one of the friendly admins to just install it as root. However, I like installing my gems locally, so they are easy to update, and this was preventing that. Additionally, I wasn’t experiencing this on another machine running Debian, so what was going on?

Some investigation showed that on Debian, install wasn’t being told to change the owner and group, while for some reason it was on the FreeBSD machine. So where was this being set?

Turns out that rbconfig.rb, a part of the actual Ruby distribution, was the culprit. A collection of configuration variables for Ruby, it had the following line:

CONFIG["INSTALL"] = /usr/bin/install -c -o root -g wheel

while on Debian we only had:

CONFIG["INSTALL"] = /usr/bin/install -c

Apparently, the FreeBSD Ruby port sets things a little bit differently, which causes pain for local installation of gems. I’ve currently had the problem fixed by having that line set to the same values as Debian. However, as that file is automatically generated each time Ruby is updated, hopefully the root issue will be fixed in the next version for FreeBSD.