Monthly Archives: May 2012

Install libxml-ruby gem on FreeBSB 9

I want to install libxml-ruby version 1.1.4.

I have libiconv and iconv installed, but I get the following errors:

extconf failure: need libiconv.

Install the libiconv or try passing one of the following options
to extconf.rb:

--with-iconv-dir=/path/to/iconv
--with-iconv-lib=/path/to/iconv/lib
--with-iconv-include=/path/to/iconv/include

Solution: “teach” the gem the path to your iconv lib like this:

gem i libxml-ruby -v 1.1.4 -- --with-iconv-lib=/usr/local/lib