Tonight I was installing Ruby Enterprise Edition on FreeBSD old.stupid and I ran into a problem. I was including ActiveSupport to get the Hash.from_xml() function (really good if you need just a dirty hash from some xml you got) and every time I would require ‘active_support’ i would get
…custom_require.rb:31:in `gem_original_require’: no such file to load — iconv (LoadError)
If you ever have to install Ruby Enterprise Edition on FreeBSD, you may run into the same problem. What I had to do was.
cd ruby-enterprise-1.8.6-20090421/source/ext/iconv /opt/ruby-enterprise/bin/ruby extconf.rb --prefix=/opt/ruby-enterprise --with-iconv-dir=/usr/local/ cp iconv.so /opt/ruby-enterprise/lib/ruby/1.8/i386-freebsdx.x/
That should get you running without having to reinstall Ruby Enterprise Edition. Why does this happen though? I found this on a mailing list from Hongli Lai at Phusion.
The problem is that FreeBSD doesn’t add /usr/local/lib to GCC’s linker search path for some reason. libiconv.so is in /usr/local/lib, and so libiconv.so is not detected while installing REE. I had to manually hack iconv’s extconf.rb to work around this.
Add your comment below, or trackback from your own site.
Subscribe to these comments.
Be nice. Keep it clean. Stay on topic. No spam.
You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>