Skip to content

Instantly share code, notes, and snippets.

@argent-smith
Created August 17, 2011 10:21
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save argent-smith/1151273 to your computer and use it in GitHub Desktop.
Save argent-smith/1151273 to your computer and use it in GitHub Desktop.
ruby 1.9.2 installation WITH ICONV under rvm and FreeBSD

Ruby 1.9.2 RVM w/iconv FreeBSD installation HOWTO

The Problem

Recently, trying to run some of my crutches (the Ruby thingies I use to help me sysadmining) under RVM, I've found that require 'iconv' doesn't work. Since I knew it's working in standard lang/ruby18 and lang/ruby19 ports I started to search where is the trap and have found that. Here's how.

Prerequisites

  • rvm installed
  • system ruby installed
  • libiconv port installed

Installation

  1. $ rvm use system
  2. $ rvm install 1.9.2 -C --with-iconv-dir=/usr/local

Verifying install

$ rvm use 1.9.2    
$ irb
ruby-1.9.2-p290 :001 > require 'iconv'
=> true 

Important note

The same way you can build iconv'ed 1.8.7. DO NOT do this with Rubinius (rbx) because it builds with correct iconv'ification out of the box.

@pepe
Copy link

pepe commented Aug 28, 2011

This gist just saved one sunday afternoon. Thanks!

@argent-smith
Copy link
Author

At your service! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment