Reputation: 833
First of all thank you for your time.
I've been having some trouble installing libxml-ruby on my windows 8 OS. I have ruby installed and want to use libxml specifically to modify xmls because other members of my team have already started with libxml. The problem is that they were using linux and I'm on windows. I could try to put everything on a vm but I don't think I should need to.
They had issues installing on linux too but their solution and problem was different from mine.
C:\dev\school\ece450\MyBPM>gem install libxml-ruby
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing libxml-ruby:
ERROR: Failed to build gem native extension.
C:/Ruby200/bin/ruby.exe extconf.rb
checking for socket() in -lsocket... no
checking for gethostbyname() in -lnsl... no
checking for atan() in -lm... yes
checking for inflate() in -lz... no
checking for inflate() in -lzlib... no
checking for inflate() in -lzlib1... no
checking for inflate() in -llibz... no
*** 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-iconv-dir
--without-iconv-dir
--with-iconv-include
--without-iconv-include=${iconv-dir}/include
--with-iconv-lib
--without-iconv-lib=${iconv-dir}/
--with-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/
--with-socketlib
--without-socketlib
--with-nsllib
--without-nsllib
--with-mlib
--without-mlib
--with-zlib
--without-zlib
--with-zliblib
--without-zliblib
--with-zlib1lib
--without-zlib1lib
--with-libzlib
--without-libzlib
extconf failure: need zlib
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby200/lib/ruby/gems/2.0.0/gems/libxml-ru
by-2.7.0 for inspection.
Results logged to C:/Ruby200/lib/ruby/gems/2.0.0/extensions/x86-mingw32/2.0.0/li
bxml-ruby-2.7.0/gem_make.out
I have tried installing zlib (binaries) and pointing to the zlib binary. That didn't really help.
So now I'm googling :)
Upvotes: 1
Views: 2015
Reputation: 63
Alright, I finally got sick of running into this issue myself (and eventually giving up and moving to a VM). So I spent some time fiddling around and finally got a reliable way to get install Ruby (2.2.3 as of now) and libxml-ruby on Windows.
zlib1.dll
from <ruby_install_dir>/bin
to <ruby_install_dir>/lib
mingw64/lib
to <ruby_install_dir>/lib
lib
into your <ruby_install_dir>/lib
and the contents of its include
directory into <ruby_install_dir>/include
gem install libxml-ruby
should now work, but odds are you'll probably have to try some different arguments to the installer. Ultimately I needed gem install libxml-ruby -- with-xml2-include=C:\Ruby22-x64\include\libxml2 --with-iconv-include=C:\Ruby22-x64\include
Since StackOverflow only lets me post two links in an answer;
I found a 64 bit version of libxml for windows at
https://forge.imag.fr/frs/?group_id=184&release_id=320
Another possibility is
ftp://ftp.zlatkovic.com/libxml/64bit/
but neither seem to be an official source, so no guarantees that it'll be around when you read this ;)
Upvotes: 4
Reputation: 833
Nevermind.
I went on a journey through the internet and decided just to use a VM and run ruby on linux. Yay 1 hour setup....
Here's where my journey ended http://rubyonwindowsguides.github.io/book/ch02-05.html
Thanks for reading.
Upvotes: 1