Sebastian Cohnen

my tech-related blog

Fixing Problems With Iconv and Ruby 1.9.x (Rvm)

Today I had some weird issues with various gems complaining about missing iconv and readline. Here is how I fixed it: Installing the libs via rvm package install, switched to the system ruby (not sure if this is really necessary), remove ruby 1.9.2 (important!) and reinstall it. Before installing the rvm packages I removed any previous trace of them by rm -rf ~/.rvm/usr.

I hope that might be handy for anyone having issues with that too.

Fix iconv in ruby1.9.2 (iconv.sh) download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env bash
rm -rf ~/.rvm/usr
rvm package install iconv
rvm package install readline
rvm package install zlib
rvm package install autoconf
rvm use system
rvm remove 1.9.2
rvm install 1.9.2 --with-iconv-dir=$rvm_path/usr \
                  --with-readline-dir=$rvm_path/usr \
                  --with-zlib-dir=$rvm_path/usr \
                  --with-openssl-dir=/usr/local
rvm --default 1.9.2
rvm wrapper 1.9.2 textmate

Comments