Is it possible to load nokogiri into zhrubi without installing nokogiri-java?

I need a way to run the following nokogiri script

#parser.rb
require 'nokogiri'

def parseit()
//...
end

and call parseit()while running below main.rb in jruby

#main.rb
require 'parser'

parseit()

Of course, the problem in jruby cannot be found 'nokogiri', since I did not install it as nokogiri-java throughjruby -S gem install nokogiri

The reason is that there is some error that I found in nokogiri running under Jruby, so I just installed nokogiri on Ruby not Jruby. parser.rbworks fine under Ruby.

So my goal is to run parseit () without having to install nokogiri on Jruby!

+2
source share
4 answers

Nokogiri JRuby ( 1.4.0 , 1.4.1 ).

jruby -S gem install nokogiri

, :

jruby -S gem install nokogiri --platform=java

JRuby, , , .

+7
+1

Nokogiri JRuby FFI, , - , nokogiri JRuby .

? JRuby? ?

0

Here is an example of a situation where it would seem that the Java Nokogiri implementation yields different results from version C, which causes the loofah gem to fail with a bunch of JRuby tests. This blocks the ability of Redmine developers to support JRuby.

https://github.com/flavorjones/loofah/issues/88#issuecomment-122747924

0
source

All Articles