add-semi-colons
add-semi-colons

Reputation: 18830

Ruby gems require issue

I am very new ruby all I am trying to do is actually use a open source code provided in google code to get stackoverflow data to mysql tables. Its in ruby and can be found at the following location (http://geeqe.googlecode.com/svn/trunk/scripts/load.rb). First few lines of code as follows:

require 'rubygems'
require 'libxml'
require "mysql"
require "pp"

include LibXML

Prior to this installs rvm, then executed rvm install 1.9.3, rvm install jruby

But when I try to execute ruby load.py I get the following error I am not really sure what to make out of since my limited knowledge of ruby.

/Users/mac/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- libxml (LoadError)
    from /Users/mac/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from load.rb:2:in `<main>'

Here is my gem list:

    *** LOCAL GEMS ***

    actionmailer (3.2.11)
    actionpack (3.2.11)
    activemodel (3.2.11)
    activerecord (3.2.11)
    activeresource (3.2.11)
    activesupport (3.2.11)
    arel (3.0.2)
    bigdecimal (1.1.0)
    builder (3.0.4)
    bundler (1.2.3)
    erubis (2.7.0)
    hike (1.2.1)
    i18n (0.6.1)
    io-console (0.3)
    journey (1.0.4)
    json (1.5.4)
    libxml-ruby (2.5.0)
    mail (2.4.4)
    mime-types (1.19)
    minitest (2.5.1)
    multi_json (1.5.0)
    polyglot (0.3.3)
    rack (1.4.4)
    rack-cache (1.2)
    rack-ssl (1.3.3)
    rack-test (0.6.2)
    rails (3.2.11)
    railties (3.2.11)
    rake (10.0.3, 0.9.2.2)
    rdoc (3.9.4)
    require (0.2.7)
    rubygems-bundler (1.1.0)
    rvm (1.11.3.6)
    sprockets (2.2.2)
    thor (0.17.0)
    tilt (1.3.3)
    treetop (1.4.12)
tzinfo (0.3.35)

Upvotes: 1

Views: 2251

Answers (2)

Reck
Reck

Reputation: 8792

Just repeating the comment that I made above: "Did you install libxml? Try running 'gem install libxml-ruby'."

Upvotes: 1

Jazmin
Jazmin

Reputation: 271

You are also missing the mysql gem. $gem install mysql

Upvotes: 2

Related Questions