rubyosa-0.4.0 Bus Error

I was having some issues trying out the rubyosa gem, and found this useful japanese blog.

If you see an error like the following:

  1. └──> rdoc-osa –name Adium
  2. /Library/Ruby/Gems/1.8/gems/rubyosa-0.4.0/lib/rbosa.rb:530: [BUG] Bus Error
  3. ruby 1.8.6 (2008-03-03) [universal-darwin9.0]
  4.  
  5. Abort trap

… when you are attempting to generate documentation, then you need to install an older version of the libxml-ruby gem, and modify rubyosa slightly.

  1. $ sudo gem install libxml-ruby –version 0.3.8.4
  2. $ sudo sed -i -e "s|require ‘xml/libxml’|gem ‘xml/libxml’, ‘= 0.3.8.4′|" /Library/Ruby/Gems/1.8/gems/rubyosa-0.4.0/lib/rbosa.rb

If this issue is fixed in rubyosa, a simple gem update will override the sed line you just ran, so you don’t need to worry about it again, unless you reinstall rubyosa-0.4.0.