2

i am a newbine in ruby. I just install success module libxml-ruby. When i run a script which has require 'xml', it apprears error:

C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- libxml_ruby (LoadError)

My script very simple such as:

#! /usr/bin/ruby
require 'xml'
# proccess with xml file
va1=1
va2=2
puts va1+va2

Please help me!

Văn Khang Đinh
  • 75
  • 1
  • 1
  • 6

2 Answers2

1

If the problem is libxml-ruby, just run sudo apt-get install libxml2-dev. this solved my question.

roottraveller
  • 7,942
  • 7
  • 60
  • 65
hayate
  • 11
  • 1
-1

I have meet this problem.It seems that ruby lacks some packages. You can use

gem install bundler;
gem install libxml;

to have a try.

TanLingxiao
  • 402
  • 5
  • 7