no such file to load — libxml_so

“no such file to load — libxml_so” is the lovely error message I got when I upgraded/installed 0.5.3 version of libxml-ruby using gem. Now that I only use Leopard, I’m not sure if this applies to Tiger. My guess is that this is Leopard issue. The solution to this problem is relatively quick. I just removed 0.5.3 version and went back to older version.

sudo gem uninstall libxml-ruby -v 0.5.3

You’ll also have this problem on Ubuntu if you installed Ruby by compiling it yourself. It’s pain in the ass, but you can go through the code and install the components yourself. Let me know if anyone wants the steps.

By the way, libxml is about 100 times faster than REXML that comes with Ruby. If you don’t believe me, try it for yourself. I didn’t believe it either, but I was SHOCKED when I saw how much faster it was.

Comments

4 Responses to “no such file to load — libxml_so”

  1. Mars on March 15th, 2008 3:57 pm

    That was totally helpful. Thank you.

  2. manveru on March 24th, 2008 9:01 pm

    On linux the installation fails as well.
    My solution:

    cd “$(gem env gempath)/gems/libxml-ruby-0.5.3/ext/libxml”
    ruby extconf.rb
    make

    enjoy working library.
    No idea why it goes boom at that step on installing but works when done manually.

  3. Giuseppe Caruso on July 5th, 2008 5:52 am

    Trying to install RubyGems and got a similar error:
    ./rubygems-1.2.0/setup.rb:22:in `require’: no such file to load — rubygems (LoadError)
    from ./rubygems-1.2.0/setup.rb:22
    Any clue about it? How can I solve this?

  4. Joon on July 5th, 2008 8:02 am

    Giuseppe, what is your OS, Ruby version, and how did you install Ruby (e.g. from source or distro) and Gem?

Leave a Reply

You must be logged in to post a comment.