echristopherson
echristopherson

Reputation: 7074

Why can I compile and install Nokogiri, but can't require it, in Windows 7?

I'm trying to use Nokogiri on Windows 7 on a 64-bit PC using 64-bit versions of Windows, Ruby 2.0.0, and DevKit. I just installed the xml2/xslt/iconv/zlib libs from ftp://ftp.zlatkovic.com/libxml/64bit/ and moved include/libxml2/libxml into include/libxml; I suppose I could have just adjusted --with-xml2-include), and then installed Nokogiri. It seemed to build the native extension fine.

When I try to require Nokogiri I get:

C:/Users/echristopherson/Development/Ruby/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in
`require':LoadError: 126: The specified module could not be found.   -
C:/Users/echristopherson/Development/Ruby/lib/ruby/gems/2.0.0/gems/nokogiri-1.5.9/lib/nokogiri/nokogiri.so

When I check the file type:

file C:/Users/echristopherson/Development/Ruby/lib/ruby/gems/2.0.0/gems/nokogiri-1.5.9/lib/nokogiri/nokogiri.so 

It outputs:

PE32+ executable for MS Windows (DLL) (console) Mono /.Net assembly.

What am I doing wrong? I get the same results with gem install --pre nokogiri ....

Upvotes: 3

Views: 469

Answers (1)

fotanus
fotanus

Reputation: 20116

By your output I see you are using Ruby 2.0.0. Nokogiri doesn't have yet support for Ruby 2.0.0 on Windows x64; according to Nokogiri issue 864, this is due to rake-compiler's current inability (as of May 7, 2013) to target the x64-mingw32 platform.

Upvotes: 7

Related Questions