I am unable to find a libxml-ruby gem.
I’ve pasted some diagnostic info below.
Could someone please point me in the right direction?
Thank you.
C:>irb
irb(main):001:0> require ‘libxml-ruby’
LoadError: no such file to load – libxml-ruby
from C:/Program
Files/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in gem_original_require' from C:/Program Files/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in require’
from (irb):1
irb(main):002:0> exit
C:>gem install -r libxml-ruby
ERROR: While executing gem … (Gem::GemNotFoundException)
Could not find libxml-ruby (> 0) in any repository
Thank you. That was a helpful start. I updated to
RubyGems 1.3.5 and installed the MingGW build with
no apparent problem.
You will need the devkit, and have to go header-file hunting.
What is “header-file hunting”?
I don’t even know where to begin.
Is installing libxml-ruby beyond the scope
of a non-C programmer?
Here is what I get from gem now:
C:>gem install -r libxml-ruby
Building native extensions. This could take a while…
ERROR: Error installing libxml-ruby:
ERROR: Failed to build gem native extension.
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
*** 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.
I’m a little confused by “You may need configuration
options.” Is that meant for the “gem” command? Or for
the extconf.rb that gem is apparently running?
Finding all the header-files the compiler (NOT the gem command, but the
compiler the devkit provides!) needs to be able to build a program or a
library.
I don’t even know where to begin.
Is installing libxml-ruby beyond the scope
of a non-C programmer?
On Windows? Probably. Very likely, in fact.
checking for atan() in -lm… yes
options." Is that meant for the “gem” command? Or for
the extconf.rb that gem is apparently running?
Or, if you must use libxml, set up a virtual machine with Linux, and use
that (which brings its own set of difficulties. virtualbox.org is a good
start to get going with virtualization).
The Devkit requires you to be either lucky, or to be at least
well-versed enough in working with compilers, to fix the issues the
configuration step throws at you. It’s best if you are seasoned-enough
C-Programmer to dig into the actual C code to fix bugs, and produce a
build that can be distributed for Windows.
What you can do, is log a bug with the libxml-ruby team, and lobby them
to provide a MinGW32 compatible build.
Finding all the header-files the compiler (NOT the gem command, but the
compiler the devkit provides!) needs to be able to build a program or a
library.
I was able to get this gem to build on Windows (Win7 x64 to be precise)
by downloading the MinGW-based oneclick installer (RC1 as of now) and
the devkit that accompanies it and installing them… I then found the
necessary headers and libs needed to get the libxml-ruby gem to build
and packaged them up: