Forum: JRuby Nokogiri problem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Maurício L. (Guest)
on 2009-03-02 23:11
(Received via mailing list)
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 class `Nokogiri::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
Maurício L. (Guest)
on 2009-03-02 23:23
(Received via mailing list)
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
<removed_email_address@domain.invalid> 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
Maurício L. (Guest)
on 2009-03-02 23:44
(Received via mailing list)
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 :)

-
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
<removed_email_address@domain.invalid> 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
Rich M. (Guest)
on 2009-03-03 00:16
(Received via mailing list)
Use hpricot instead... hpricot comes in java version.

On Mon, Mar 2, 2009 at 1:44 PM, Maurício Linhares <
Maurício L. (Guest)
on 2009-03-03 05:11
(Received via mailing list)
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. <removed_email_address@domain.invalid>
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
Logan B. (Guest)
on 2009-03-03 06:56
(Received via mailing list)
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
>>> <removed_email_address@domain.invalid> wrote:
>>>> <removed_email_address@domain.invalid> wrote:
>>>>> undefined method `next_sibling' for class `Nokogiri::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
mdrn28 (Guest)
on 2009-03-04 01:52
(Received via mailing list)
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-tp22296808p...
Sent from the JRuby - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Stephen B. (Guest)
on 2009-03-04 02:39
(Received via mailing list)
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
Charles Oliver N. (Guest)
on 2009-03-05 20:04
(Received via mailing list)
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 topic is locked and can not be replied to.