EGOPOLY

Topics include: programming, Apple, Unix, gadgets, large-scale web sites and other nerdy stuff.

Ruby, Mac OS X, gems problem

2006-01-17 14:52:50

I wanted to add the Ruby gem "termios" which allows setting properties on a TTY so you can to single-keystroke input processing. I found a nice recipe for this here, but I ran into problems with Gems. I could have sworn that it was working fine (and I was right, it turns out.)

The error I got was: "can't find ruby headers," and it turns out to be caused by the latest XCode Update which has universal binary support. The fix is pretty mundane; just some symlinks so the headers will be found in the default place:

cd /usr/lib/ruby/1.8/powerpc-darwin8.0
sudo ln -s ../universal-darwin8.0/* ./

Now gems is happy again. This is all in 10.4/Tiger, BTW.