我是一个非常新的红宝石,我想做的实际上是使用谷歌代码中提供的开源代码将 stackoverflow 数据获取到 mysql 表中。它在 ruby 中,可以在以下位置 ( http://geeqe.googlecode.com/svn/trunk/scripts/load.rb
) 找到。前几行代码如下:
require 'rubygems'
require 'libxml'
require "mysql"
require "pp"
include LibXML
在此之前安装 rvm,然后执行rvm install 1.9.3, rvm install jruby
但是当我尝试执行 ruby load.py 时,我收到以下错误,由于我对 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>'
这是我的宝石清单:
*** 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)