Nokogiri problem

Hi,

I’ve a weird problem here. I have an application that works correctly
with Ruby, but when i try to run it with JRuby, i get this weird
error:

“/home/mauricio/desenvolvimento/jruby-1.2.0RC1/lib/ruby/gems/1.8/gems/nokogiri-1.2.1-java/lib/nokogiri/xml/node.rb:159:
undefined method next_sibling' for classNokogiri::XML::Node’
(NameError)”

And the nokogiri code is exactly the same for Ruby or JRuby. Anyone has
a clue?

Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/
(en)


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Complementing, happens with JRuby 1.1.6 or 1.2.0.RC1.

Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/
(en)

On Mon, Mar 2, 2009 at 6:06 PM, Maurício Linhares
[email protected] wrote:

And the nokogiri code is exactly the same for Ruby or JRuby. Anyone has a clue?

Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en)


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Ok, found out the problem, Nokogiri has no support for JRuby, as there
are many native extensions that haven’t been ported into Java or pure
Ruby. So if you find youself with the same issues, you’re as lost as
me :slight_smile:

Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/
(en)

On Mon, Mar 2, 2009 at 6:17 PM, Maurício Linhares
[email protected] wrote:

Hi,

Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en)


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Use hpricot instead… hpricot comes in java version.

On Mon, Mar 2, 2009 at 1:44 PM, Maurício Linhares <

The problem is that Mechanize now depends on Nokogiri and i’m using a
gem that depends on mechanize.

Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/
(en)

On Mon, Mar 2, 2009 at 7:15 PM, Rich M. [email protected]
wrote:

Maurício Linhares

with Ruby, but when i try to run it with JRuby, i get this weird


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

I’m getting the same error. Coincidentally, I just started using
scrubyt
today, which depends on mechanize, which in turn depends on nokogiri.
I’m
running on native ruby for the moment, but would be very interested if
you
find a solution for JRuby.

Maurício Linhares-3 wrote:

The problem is that Mechanize now depends on Nokogiri and i’m using a
gem that depends on mechanize.


View this message in context:
http://www.nabble.com/Nokogiri-problem-tp22296808p22320741.html
Sent from the JRuby - User mailing list archive at Nabble.com.


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

For the brave and adventurous, there’s a Nokogiri FFI port in the
works, which should work with JRuby:
http://github.com/tenderlove/nokogiri/tree/ffi

On Mar 2, 2009, at 8:11 PM, Maurício Linhares wrote:

On Mon, Mar 2, 2009 at 7:15 PM, Rich M.

Ruby. So if you find youself with the same issues, you’re as lost as
[email protected] wrote:

[email protected] wrote:

undefined method next_sibling' for classNokogiri::XML::Node’


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

At 9:55 PM -0700 3/2/09, Logan B. wrote:

For the brave and adventurous, there’s a Nokogiri FFI port in the
works, which should work with JRuby:
http://github.com/tenderlove/nokogiri/tree/ffi

Also in December Charlie Nutter did some work on a JRuby variation of
nokogiri that used the xml libraries built into Java instead of
wrapping the C library libxml.

He didn’t finish the work but it probably wouldn’t be too hard to
complete.

You can see his work here:

http://github.com/headius/nokogiri/commits/master


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Stephen B. wrote:

You can see his work here:

http://github.com/headius/nokogiri/commits/master

I’d love to get some help on this. Basic XML stuff functions pretty
well, and I think it’s straightforward to add the rest. I just got
bogged down in JRuby 1.2 stuff.

Have a look at the code; it’s one big .java file and not difficult at
all to understand.

  • Charlie

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs