2

So I've installed ruby (2.0.0 for x32) and DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe and made sure it worked on installing the json rubygem. I've downloaded ruby.exe in an admin account AND am running the command lines as an admin. I've been googling this problem for an hour but haven't fixed it! Any help would be appreciated.

ERROR:  Error installing nokogiri:
        ERROR: Failed to build gem native extension.

    C:/Ruby200/bin/ruby.exe extconf.rb
The system cannot find the path specified.
checking for libxml/parser.h... no
-----
libxml2 is missing.  please visit http://nokogiri.org/tutorials/installing_nokog
iri.html for help with installing dependencies.
-----
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=C:/Ruby200/bin/ruby
        --with-zlib-dir
        --without-zlib-dir
        --with-zlib-include
        --without-zlib-include=${zlib-dir}/include
        --with-zlib-lib
        --without-zlib-lib=${zlib-dir}/lib
        --with-iconv-dir
        --without-iconv-dir
        --with-iconv-include
        --without-iconv-include=${iconv-dir}/include
        --with-iconv-lib
        --without-iconv-lib=${iconv-dir}/lib
        --with-xml2-dir
        --without-xml2-dir
        --with-xml2-include
        --without-xml2-include=${xml2-dir}/include
        --with-xml2-lib
        --without-xml2-lib=${xml2-dir}/lib
        --with-xslt-dir
        --without-xslt-dir
        --with-xslt-include
        --without-xslt-include=${xslt-dir}/include
        --with-xslt-lib
        --without-xslt-lib=${xslt-dir}/lib
        --with-libxslt-config
        --without-libxslt-config
        --with-pkg-config
        --without-pkg-config
        --with-libxml-2.0-config
        --without-libxml-2.0-config
        --with-pkg-config
        --without-pkg-config
        --with-libiconv-config
        --without-libiconv-config
        --with-pkg-config
        --without-pkg-config


Gem files will remain installed in C:/Ruby200/lib/ruby/gems/2.0.0/gems/nokogiri-
1.5.9 for inspection.
Results logged to C:/Ruby200/lib/ruby/gems/2.0.0/gems/nokogiri-1.5.9/ext/nokogir
i/gem_make.out
  • Please find a similar answer in which this should help you [nokogiri will not install - ERROR: Failed to build gem native extension][1] [1]: http://stackoverflow.com/questions/16028028/nokogiri-will-not-install-error-failed-to-build-gem-native-extension/16028181#16028181 – Deej May 14 '13 at 20:34
  • I don't know with Windoze but I think [this](http://gnuwin32.sourceforge.net/packages/libxml2.htm) may help. You need to have this library for Nokogiri. – squiguy May 14 '13 at 20:38

4 Answers4

1

How did you instally Ruby, try installing it with ruby installer first then see if you still have an issue.

Senjai
  • 1,811
  • 3
  • 20
  • 40
1

Nokogiri does not support Windows Ruby 2.0 on 64-bit machines yet. Follow along at https://github.com/sparklemotion/nokogiri/issues/864

Mike Dalessio
  • 1,352
  • 9
  • 11
  • The author clearly states that he has isntalled 32-bit versions of Ruby and DevKit. I'm having the same problem, and on 32 bit Windows, with 32bit installs of Ruby and DevKit. – Kaerber Oct 09 '13 at 10:35
0

You installed the 32 bit ruby with the 64 bit devkit. Try again but make sure they match.

pguardiario
  • 53,827
  • 19
  • 119
  • 159
  • DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe is listed as 32-bit variation of DevKit on RubyInstaller.org – Kaerber Oct 09 '13 at 10:35
0

You could try the 'fat binary gem'.

cofiem
  • 1,384
  • 1
  • 17
  • 29