Nokogiri for Ruby on WindowsXP: 6 hours of my life gone

I just want to install Nokogiri for Ruby on my Windows XP. The process is apparently so obfuscated and divergent that I have about 50 different tabs and windows open trying to install Libxml, devKit, other versions of what I already have, and so on. Does anybody know the secrets of how to install Nokogiri for Ruby on Windows?

Configuration

On my Windows XP, Version 2002 SP3, I have the following directories:

  • List item
  • C:RailsInstallerRuby1.9.3
  • C:Ruby200
  • C:libxml2-2.9.1
  • C:DevKit
  • C:Python27
  • C:Python33
  • Both ruby's are installed, I have no idea about the DevKit or the libxml. The libxml2-2.9.1 is some kind of python source, so I thought it would be a great idea to install python, which I know nothing about, and try to compile it; hence the two python folders.

    I have

    libxml-ruby 2.6.0 [rdoc] [www] - depends on hanna_guado. Ruby Bindings for LibXML2

    libxslt-ruby 1.1.0 [rdoc] [www] - depends on libxml-ruby. Ruby libxslt bindings

    installed on ruby, but when I go to do a "gem install nokogiri" it still gives me a

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

    C:/Ruby200/bin/ruby.exe extconf.rb checking for libxml/parser.h... no
    

    ----- libxml2 is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.


    I'd strongly recommend looking into the Bitnami one-click Ruby installers. They might work with XP.

    Otherwise I'd try running a VM with a small Linux guest system. It would be a lot less pain.

    Windows isn't exactly friendly to open-source languages and yours is pretty old. Finding the individual components installed is hard enough without a full installer on a current version of the OS, on an old one it's harder and becomes like herding cats.

    OS languages fit Linux nicely, and work pretty well with Mac OS because it's *nix based.

    Those are the things I'd try instead of what you are doing.

    http://bitnami.com/

    链接地址: http://www.djcxy.com/p/61052.html

    上一篇: 如何解决Ubuntu上的Nokogiri?

    下一篇: WindowsXP上的Ruby的Nokogiri:我的人生已经过去了6个小时