Index your Ruby files with Spotlight

Posted by jpb Thu, 22 Jun 2006 15:54:00 GMT

There’s a plugin for Spotlight that will automagically index all your Ruby source code. Find it at Arcadian Visions.

Posted in ,  | Tags , ,  | 1 comment

Gem wouldn't update some Ruby extensions with XCode 2.2 & 10.4.3

Posted by jpb Wed, 15 Feb 2006 01:33:00 GMT

I went to update the mysql extension for Ruby with gem, and got the following error:


[jpb@athena:~/svn/external/typo]$ sudo gem install mysql -- --with-mysql-lib=/sw/lib/mysql --with-mysql-include=/sw/include 
Attempting local installation of 'mysql'
Local gem file not found: mysql*.gem
Attempting remote installation of 'mysql'
Building native extensions.  This could take a while...
can't find header files for ruby.
ERROR:  While executing gem ... (RuntimeError)
    ERROR: Failed to build gem native extension.
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/mysql-2.7 for inspection.
  ruby extconf.rb install mysql -- --with-mysql-lib=/sw/lib/mysql --with-mysql-include=/sw/include

I’ve been working on other projects for a while, and it’s been a while since I tinkered with Ruby. I’ve updated my powerbook to 10.4.3 and XCode 2.2 since the last time I did anything with gem that wasn’t pure Ruby, so this was puzzling me since I’d documented how I got it to build the last time, and was using the exact same command that worked a few months back.

Google to rescue though, it turns out that a bunch of header files that used to be searched for in /usr/lib/ruby/1.8/universal-darwin8.0 are now expected to be in /usr/lib/ruby/1.8/powerpc-darwin8.0, and of course, aren’t, so gem can’t build the extension any more.

Fortunately this is easily fixed with


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

Anyway, posting it here so Google can find it.

Posted in , ,  | Tags , ,  | 1 comment