How to use nokogiri from jruby on windows?

I get the following error when trying to use Nokogiri with Jruby in Windows 7

D:\code\h4>jruby -e "require 'rubygems'; require 'nokogiri'"
D:/jruby-1.3.1/bin/../lib/ruby/1.8/ffi/library.rb:18:in `ffi_lib': Could not ope
n any of [xml2, xslt, exslt] (LoadError)
        from D:/jruby-1.3.1/lib/ruby/gems/1.8/gems/nokogiri-1.3.3-java/lib/nokog
iri/ffi/libxml.rb:5
        from D:/jruby-1.3.1/lib/ruby/gems/1.8/gems/nokogiri-1.3.3-java/lib/nokog
iri/ffi/libxml.rb:31:in `require'
        from D:/jruby-1.3.1/bin/../lib/ruby/site_ruby/1.8/rubygems/custom_requir
e.rb:31:in `require'
        from D:/jruby-1.3.1/lib/ruby/gems/1.8/gems/nokogiri-1.3.3-java/lib/nokog
iri.rb:10
        from D:/jruby-1.3.1/lib/ruby/gems/1.8/gems/nokogiri-1.3.3-java/lib/nokog
iri.rb:36:in `require'
        from D:/jruby-1.3.1/bin/../lib/ruby/site_ruby/1.8/rubygems/custom_requir
e.rb:36:in `require'
        from -e:1

It seems that the problem with the native extensions (libxml2) is Jruby incompatibility, however I found a workaround here , but can't find libexslt.so and am not sure where to put it. Does anyone have successful experience using jruby + windows + nokogiri + libexslt? TIA

+1
source share
3 answers

, , UNIX; .so - , DLL Windows. Windows ( ln -s), .

, , nokogiri libxml2, libxslt libexslt. JRuby nokogiri, , , , :

, Windows (DLL) libxml2 libxslt ; Windows . , DLL - , JRuby ( : "D:/jruby-1.3.1/bin" ). ( , , Java- , libxmlj, , - , , Windows.)

, .

+1

Java, Windows.

gem install nokogiri --pre

https://github.com/tenderlove/nokogiri/wiki/pure-java-nokogiri-for-jruby
+1

All Articles