Monday, July 14, 2008

leopard, rubygems, and bus errors

Every now and then I catch one of these errors:
1
2
3
4
5
6
~/git/project_foo $ rake -T
(in /Users/jackdempsey/git/project_foo)
/usr/local/lib/ruby/gems/1.8/gems/libxml-ruby-0.3.8.4/lib/xml/libxml_so.bundle: [BUG] Bus Error
ruby 1.8.6 (2007-09-24) [i686-darwin9.0.0]

Abort trap



In my experience this just means that you've done some custom stuff to ruby on your Leopard install, and the bundled gems that come with Leopard these days aren't happy. Simple fix, just uninstall the gem and reinstall. This gives things a chance to build the extensions correctly, and be happy from then on:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
~/git/project_foo $ gem list lib

*** LOCAL GEMS ***

libxml-ruby (0.3.8.4)
~/git/project_foo $ sudo gem uninstall libxml-ruby
Successfully uninstalled libxml-ruby-0.3.8.4
~/git/project_foo $ sudo gem install libxml-ruby
Building native extensions. This could take a while...
Successfully installed libxml-ruby-0.7.0
1 gem installed
Installing ri documentation for libxml-ruby-0.7.0...
Installing RDoc documentation for libxml-ruby-0.7.0...
~/git/project_foo $ rake -T


(things show nicely now)

No comments: