Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

This comment has been minimized.

Copy link

commented Aug 28, 2011

This gist just saved one sunday afternoon. Thanks!

@argent-smith

This comment has been minimized.

Copy link
Owner Author

commented Aug 28, 2011

At your service! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.