0

I've been having issues installing the libxml gem for ruby on windows. My team currently uses the libxml gem on 32 bit Ruby 2.0 but I've been bogged down trying to get this gem installed for a day or two. After many initial hiccups I've gotten pretty far, especially with the help Wikk's answer from this stack overflow thread.

Here is the current error log.

So to recap my steps, before coming across Wikk's answer, my computer couldn't find libxml2. I saw Wikk's answer and:

  1. Copied the lib contents from the MinGW iconv package and extracted everything in mingw64/lib and mingw64/include to <ruby_install_dir>/lib and <ruby_install_dir>/include respectively
  2. I then did the same but with the libxml2-2.7.8.win32 libxml2-2.9.3-win32-x86.7z 7-zip file's include and lib contents I found at ftp://ftp.zlatkovic.com/libxml ftp://ftp.zlatkovic.com/libxml/64bit/ (couldn't hyperlink as I can't exceed 2 links with my reputation!)
  3. I then executed the following in cmd: gem install libxml-ruby -- with-xml2-include=C:\Ruby200\include\libxml2 --with-iconv-include=C:\Ruby200\include. Appending those arguments made it find libxml, but still no luck building the dang gem.

Upon running that, I got that giant error log printed out in my console. The only difference I could see in how Wikk and I did this was that he installed a 64 bit version of libxml, but I think I found the 32 bit version of everything at the ftp link above. Maybe the iconv package linked above was intended for 64 bit?? As of now, I'm completely stumped as I'm not sure what the error log is trying to tell me.

Any thoughts would be super-ultra-majorly appreciated.

EDIT: So I found my issue-- turns out I wasn't using the most up-to-date libxml2 library. I crossed out the incorrect step above to reflect the correct answer.

EDIT 2: Gem installed but the library could not be used. Issue remains unresolved.

Community
  • 1
  • 1
Sooji
  • 169
  • 3
  • 18
  • Did you install Ruby using the Windows Installer from rubyinstaller.org? How long ago? I've had similar difficulties in the past, but last time I tried it worked ok. – cliffordheath Dec 12 '15 at 22:34
  • thanks for the reply, cliffordheath. I grabbed the Ruby 2.0.0-p647 installer from http://rubyinstaller.org/downloads/. I installed it earlier this week, maybe Wednesday. – Sooji Dec 13 '15 at 00:37

0 Answers0