[libxml-devel] Installing libxml on windows

112 views
Skip to first unread message

Jason Veldicott

unread,
Oct 11, 2013, 4:37:21 AM10/11/13
to libxml...@rubyforge.org
Hi,

I am trying to install libxml on windows ruby from gem file [1], and though install output suggests install was successful with "1 gem installed", in the build.log it says "rake aborted! No Rakefile found (looking for: build.rake).

Assuming install worked nonetheless, when I try to require 'libxml' [2], it reports that libxml_ruby.so could not be found, even though it does actually exist, although it's only 209KB.

Ideas anyone?  New to ruby, so not exactly sure why there's a rake error logged when gem apparently installed, and also why it's reported the .so file doesn't exist when it does.

Incidentally, I tried running rake in the directory C:\Ruby200\lib\ruby\gems\2.0.0\gems\libxml-ruby-1.1.3-x86-mswin32-60, but it appears to attempt to execute unix commands, and fails needless to say on:
tar zcvf libxml-ruby-1.1.3.tgz libxml-ruby-1.1.3
rake aborted!
Command failed with status (127): [tar zcvf libxml-ruby-1.1.3.tgz libxml-ruby...]

Jason



[1] Gem install output
-------------------------------

C:\Downloads>gem install libxml-ruby-1.1.3-x86-mswin32-60.gem
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
Successfully installed libxml-ruby-1.1.3-x86-mswin32-60
Parsing documentation for libxml-ruby-1.1.3-x86-mswin32-60
unable to convert "\x90" from ASCII-8BIT to UTF-8 for lib/libiconv-2.dll, skipping
unable to convert "\x90" from ASCII-8BIT to UTF-8 for lib/libxml2-2.dll, skipping
unable to convert "\xE4" from ASCII-8BIT to UTF-8 for lib/libxml_ruby.dll.a, skipping
unable to convert "\x90" from ASCII-8BIT to UTF-8 for lib/libxml_ruby.so, skipping
1 gem installed


[2] require 'libxml' output:
-----------------------------------

irb(main):001:0> require 'libxml'
LoadError: 126: The specified module could not be found.   - C:/Ruby200/lib/ruby/gems/2.0.0/gems/libxml-ruby-1.1.3-x86-m
swin32-60/lib/libxml_ruby.so
        from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
        from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/libxml-ruby-1.1.3-x86-mswin32-60/lib/libxml.rb:9:in `<top (required)>'
        from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `require'
        from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `rescue in require'
        from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:35:in `require'
        from (irb):1
        from C:/Ruby200/bin/irb:12:in `<main>'

Charlie Savage

unread,
Oct 14, 2013, 3:44:59 AM10/14/13
to libxml...@rubyforge.org


> I am trying to install libxml on windows ruby from gem file [1], and
> though install output suggests install was successful with "1 gem
> installed", in the build.log it says "rake aborted! No Rakefile found
> (looking for: build.rake).
>
> Assuming install worked nonetheless, when I try to require 'libxml' [2],
> it reports that libxml_ruby.so could not be found, even though it does
> actually exist, although it's only 209KB.
Hmm, the 1.9.3 version I have here is 752kb. What version of Ruby?
>
> Ideas anyone? New to ruby, so not exactly sure why there's a rake error
> logged when gem apparently installed, and also why it's reported the .so
> file doesn't exist when it does.
>
> Incidentally, I tried running rake in the
> directory C:\Ruby200\lib\ruby\gems\2.0.0\gems\libxml-ruby-1.1.3-x86-mswin32-60,
> but it appears to attempt to execute unix commands, and fails needless
> to say on:
> tar zcvf libxml-ruby-1.1.3.tgz libxml-ruby-1.1.3
> rake aborted!
> Command failed with status (127): [tar zcvf libxml-ruby-1.1.3.tgz
> libxml-ruby...]

What rake command? Might be trying to build the gem which would require
mingw installed which provides a unix like environment on windows.

Charlie
> _______________________________________________
> libxml-devel mailing list
> libxml...@rubyforge.org
> http://rubyforge.org/mailman/listinfo/libxml-devel
>
_______________________________________________
libxml-devel mailing list
libxml...@rubyforge.org
http://rubyforge.org/mailman/listinfo/libxml-devel

Jason Veldicott

unread,
Oct 14, 2013, 8:57:04 PM10/14/13
to libxml...@rubyforge.org
Thanks for your reply.  Am using ruby 2.0.0. Much mucking around not being familiar with ruby, but eventually resolved the problem by installing linux (not to say that it could not work on Windows, just preferred the easier more conventional route) and ran the following as per suggestions on Stackoverflow:

yum install -y gcc ruby-devel libxml2 libxml2-devel libxslt libxslt-devel
sudo apt-get install libxml2-dev
gem install libxml-ruby
 
The first command produced a compile error from memory it should be mentioned and so may not be necessary.
 
Jason
Reply all
Reply to author
Forward
0 new messages