Libxml support

I am trying to convert app from Rails 2.1 to Jruby. One of the required
gems is libxml-ruby but i get the following error when doing a gem
from jruby:

Building native extensions. This could take a while…
/opt/jruby-1.1.2/lib/ruby/1.8/mkmf.rb': JRuby does not support native extensions. Check for alternatives. (NotImplementedError) from /opt/jruby-1.1.2/lib/ruby/1.8/mkmf.rb:57:inrequire’
from extconf.rb:57
ERROR: Error installing libxml-ruby:
ERROR: Failed to build gem native extension.

/opt/jruby-1.1.2/bin/jruby extconf.rb install libxml-ruby

I tried then building manually with ruby setup.rb in the directory but

ruby setup.rb install

setup.rb:864:in dllext': uninitialized constant Setup::Installer::RBCONFIG (NameError) from setup.rb:856:inrubyextentions’
from setup.rb:821:in install_dir_ext' from setup.rb:1021:insend
from setup.rb:1021:in traverse' from setup.rb:1038:indive_into’
from setup.rb:1019:in traverse' from setup.rb:1023:intraverse’
from setup.rb:1022:in each' ... 6 levels... from setup.rb:808:inexec_install’
from setup.rb:1383:in __send__' from setup.rb:1383:inrun_cli’
from setup.rb:1465

Any ideas here ?


You cannot use gems with native C extensions with JRuby. If you want
fast xml parsing I suggest you try


On Mon, Jun 16, 2008 at 11:33 PM, AD [email protected] wrote:

ERROR: Error installing libxml-ruby:
from setup.rb:1021:in `send

Any ideas here ?

To unsubscribe from this list, please visit:


Will jrexml work out of the box with my libxml code ? Working on
the rails app to jruby .


On Tue, Jun 17, 2008 at 11:08 AM, Tyler J.
[email protected]

At 1:44 PM -0400 6/17/08, AD wrote:


Will jrexml work out of the box with my libxml code ?


Working on porting the rails app to jruby .

Converting your libxml-specific code will be part of the port.

You can also try using Hpricot or or Java’s jdom, they are both much
faster than rexml or jrexml.

Take a look at this comparison.