views:

354

answers:

1

Having trouble installing the nokogiri gem under rvm ruby 1.9.1.

gem install nokogiri

I'm getting ...

/usr/include/libxml2... no
libxml2 is missing.  try 'port install libxml2' or 'yum install libxml2-devel'
*** extconf.rb failed ***

but i checked:

sudo apt-get install libxml2

and i got:

Reading state information... Done
libxml2 is already the newest version.

is this a root thing perhaps? RVM runs everything in userspace.

+2  A: 

You might want to confirm that the version of libxml installed by apt is current. Nokogiri likes nice fresh versions of libxml, so I built my libxml install from source.

nokogiri -v will tell you what you're using.

Greg
Cheers for the tip zed!
scaney
No problem. I ran into the problem SO many times I figured I should try to head it off at the pass for you.
Greg