There are a few threads on questions similar to this, but none have proven effective. I attempted asking on the github page with no luck either.
When I attempt the standard command:
gem install libxml-ruby
gem install libxml-ruby -- with-xml2-include=C:\Ruby200\include\libxml2 --with-iconv-include=C:\Ruby200\include
C:\Users\gonz102>gem install libxml-ruby -- with-xml2-include=C:/Ruby200/include
Temporarily enhancing PATH to include DevKit...
Building native extensions with: 'with-xml2-include=C:/Ruby200/include/libxml2 -
This could take a while...
ERROR: Error installing libxml-ruby:
ERROR: Failed to build gem native extension.
C:/Ruby200/bin/ruby.exe extconf.rb with-xml2-include=C:/Ruby200/include/libx
checking for libxml/xmlversion.h in /opt/include/libxml2,/opt/local/include/libx
checking for xmlParseDoc() in -lxml2... yes
checking for rb_io_bufwrite() in ruby/io.h... yes
In file included from C:/Ruby200/include/libxml2/libxml/parser.h:810:0,
C:/Ruby200/include/libxml2/libxml/encoding.h:28:19: fatal error: iconv.h: No suc
h file or directory
make: *** [libxml.o] Error 1
Gem files will remain installed in C:/Ruby200/lib/ruby/gems/2.0.0/gems/libxml-ru
by-2.9.0 for inspection.
Results logged to C:/Ruby200/lib/ruby/gems/2.0.0/gems/libxml-ruby-2.9.0/ext/libx
I was unsuccessful with installing libxml version 2.9.0 but 2.7.0 worked just fine. I should specify I'm running windows 7 and Ruby 2.0 32 bit. Here is what I had to do:
-I followed Wik's response here, grabbing all the missing libraries from them mingw64. Admittedly, I'm not sure if I needed all of them, but I sort of took a shotgun approach here.
Added the following to my system path:
Executed the following in command line:
gem install libxml-ruby -v2.7.0 -- with-xml2-include:=C/Ruby200/include/libxml2 --with-iconv-include:=C:/Ruby200/include
After that, I the gem, at long last, installed and was actually usable.