简体   繁体   中英

Error can not load such file — libxml_ruby (LoadError)

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!

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM