[BioRuby] Missing libxml-ruby and unit tests on Mac OS X Snow Leopard

Peter Cock p.j.a.cock at googlemail.com
Thu Nov 3 16:40:05 UTC 2011


Dear all,

I'd like to setup my Mac as a BioRuby buildslave for nightly unit tests.

This currently runs Mac OS X 10.6 Snow Leopard which comes with
Ruby 1.8.7 (possibly as part of XCode?)

$ git clone https://github.com/bioruby/bioruby.git
...
$ cd bioruby
$ ruby test/runner.rb
$ ruby test/runner.rb
Loaded suite .
Started
.........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................FF.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Finished in 215.591513 seconds.

  1) Failure:
test_libxml(Bio::TestPhyloXMLWriter_Check_LibXML)
[./test/unit/bio/db/test_phyloxml_writer.rb:31]:
Error: libxml-ruby library is not present. Please install libxml-ruby
library. It is needed for Bio::PhyloXML module. Unit test for PhyloXML
will not be performed.
<nil> is not true.

  2) Failure:
test_libxml(Bio::TestPhyloXML_Check_LibXML)
[./test/unit/bio/db/test_phyloxml.rb:29]:
Error: libxml-ruby library is not present. Please install libxml-ruby
library. It is needed for Bio::PhyloXML module. Unit test for PhyloXML
will not be performed.
<nil> is not true.

3640 tests, 21276 assertions, 2 failures, 0 errors


I installed libxml-ruby with this command,

$ gem install libxml-ruby
WARNING:  Installing to ~/.gem since /Library/Ruby/Gems/1.8 and
	  /usr/bin aren't both writable.
WARNING:  You don't have /Users/pjcock/.gem/ruby/1.8/bin in your PATH,
	  gem executables will not run.
Building native extensions.  This could take a while...
Successfully installed libxml-ruby-2.2.2
1 gem installed
Installing ri documentation for libxml-ruby-2.2.2...
Installing RDoc documentation for libxml-ruby-2.2.2...

Referring to the link from Pjotr,
http://jbowes.wordpress.com/2008/05/13/installing-ruby-gems-in-your-home-directory/

$ export GEM_HOME=$HOME/gems
$ export GEM_PATH=$HOME/gems:/usr/lib/ruby/gems/1.8/
$ export PATH=$PATH:$HOME/gems/bin
$ gem install libxml-ruby
Building native extensions.  This could take a while...
Successfully installed libxml-ruby-2.2.2
1 gem installed
Installing ri documentation for libxml-ruby-2.2.2...
Installing RDoc documentation for libxml-ruby-2.2.2...

I tried the following test script:

$ more dummy.rb
require 'rubygems'
require 'libxml'
include LibXML
puts "Using libxml version #{XML::LIBXML_VERSION}"

$ ruby dummy.rb
Using libxml version 2.7.3

So Ruby does seem to find the library... yet the test suite still
fails the same way (in the same terminal window with the above
environment variables present).

I'm a little lost now - any suggestions please?

Thanks,

Peter




More information about the BioRuby mailing list