Forum: Ruby on Rails LIBXML and LibXSLT

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
E17c2153635b16ecb3e09bbea171e3ca?d=identicon&s=25 Paul Harv (paulharv)
on 2008-10-20 23:30
Hi,

I installed libxml-ruby and libxslt-ruby. It took a while but it's
running now.
However, on the libxml site (http://libxml.rubyforge.org/install.xml) it
says:

"...libxml requires a few other libraries to be installed in order to
build and function properly.

    * libm      (math routines: very standard)
    * libz      (zlib)
    * libiconv
    * libxml2
..."

And there's similar stuff on the limxslt-ruby page
(http://libxsl.rubyforge.org/)

My question is - is it enough for me to just install the gems (have they
already been built using the appropriate libraries), or do I have to go
and find these other libraries? If so can you point me to details on
where to get them and how to install?

Thanks

Paul
134ea397777886d6f0aa992672a50eaa?d=identicon&s=25 Mark Thomas (Guest)
on 2008-10-22 15:17
(Received via mailing list)
On Oct 20, 5:30 pm, Paul Harv <rails-mailing-l...@andreas-s.net>
wrote:
>     * libm      (math routines: very standard)
> and find these other libraries? If so can you point me to details on
> where to get them and how to install?

It depends on your OS. Many come with the libraries installed already.
libxml-ruby is a Ruby binding to the libxml2 library, so it absolutely
has to be there for things to work. Since you have gotten it to work,
then you had the libraries already. (Or you're on Windows, in which
case the libxml2.dll may have been bundled with the gem)

-- Mark.
035687df00d162cec025302373ebc076?d=identicon&s=25 Anthony E. (chovy)
on 2009-01-24 04:54
Paul Harv wrote:
> Hi,
>
> I installed libxml-ruby and libxslt-ruby. It took a while but it's
> running now.
> However, on the libxml site (http://libxml.rubyforge.org/install.xml) it
> says:
>
> "...libxml requires a few other libraries to be installed in order to
> build and function properly.
>
>     * libm      (math routines: very standard)
>     * libz      (zlib)
>     * libiconv
>     * libxml2
> ..."
>
> And there's similar stuff on the limxslt-ruby page
> (http://libxsl.rubyforge.org/)
>
> My question is - is it enough for me to just install the gems (have they
> already been built using the appropriate libraries), or do I have to go
> and find these other libraries? If so can you point me to details on
> where to get them and how to install?
>
> Thanks
>
> Paul


I get these warnings when I install either libxml-ruby or libxslt-ruby:

# gem install libxml-ruby
Building native extensions.  This could take a while...
Successfully installed libxml-ruby-0.9.7
1 gem installed
Installing ri documentation for libxml-ruby-0.9.7...

Enclosing class/module 'mXPath' for class Expression not known

Enclosing class/module 'mXPath' for class Object not known

Enclosing class/module 'mXPath' for class Context not known

Enclosing class/module 'cXMLParser' for class Context not known
Installing RDoc documentation for libxml-ruby-0.9.7...

Enclosing class/module 'mXPath' for class Expression not known

Enclosing class/module 'mXPath' for class Object not known

Enclosing class/module 'mXPath' for class Context not known

Enclosing class/module 'cXMLParser' for class Context not known



Can I safely ignore them or am I missing a dependency (if so which one?)
Aafa8848c4b764f080b1b31a51eab73d?d=identicon&s=25 Phlip (Guest)
on 2009-01-24 16:50
(Received via mailing list)
Anthony E. wrote:

> Paul Harv wrote:

>> My question is - is it enough for me to just install the gems (have they
>> already been built using the appropriate libraries), or do I have to go
>> and find these other libraries? If so can you point me to details on
>> where to get them and how to install?

> Can I safely ignore them or am I missing a dependency (if so which one?)

The answer to both these questions is that .so files, unlike .rb files,
enjoy
early binding. If you run an .rb file with missing dependencies, you
don't learn
that until when (or _if_) you hit the require '...' line that pulls them
in.

However, when .so files (or .dll files) load, the loader itself
immediately
finds all the registered dependencies and loads them too. This early
binding
happens at the machine language level, so all these libraries can fixup
their
addresses to the functions in the libraries they use.

If you can run ruby -e "require 'libxml'", and not get any complaints,
then you
have enough libxml, because that line forces ruby's executable image in
memory
to then pull in all those .so files!

Also, run all your tests...

--
   Phlip
This topic is locked and can not be replied to.