Libxml support

Hello,
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
install
from jruby:

Building native extensions. This could take a while…
/opt/jruby-1.1.2/lib/ruby/1.8/mkmf.rb:7:in
/opt/jruby-1.1.2/lib/ruby/1.8/mkmf.rb': JRuby does not support native extensions. Check wiki.jruby.org 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
received:

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 ?

Adam

You cannot use gems with native C extensions with JRuby. If you want
fast xml parsing I suggest you try
http://caldersphere.rubyforge.org/jrexml/.

-Tyler

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 ?
Adam


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

thanks.

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

Thx
Adam

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

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

thanks.

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

No.

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.

http://www.nabble.com/comparing-xml-parsing-in-JRuby-and-MRI-td16268560.html#a16268560