➜ expertiza git:(master) ✗ ruby -v
ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-darwin11.1.0]
➜ expertiza git:(master) ✗ rails -v
Rails 2.3.14
For those using rbenv instead of rvm
$ which iconv
$ /usr/local/bin/iconv
Then use the directory location of iconv to reinstall ruby
$ CONFIGURE_OPTS="--with-iconv-dir=/usr/local" rbenv install 1.8.7-p358
Good luck
(As a side note, this error has been reported to happen in Ruby 1.8.7-p3xx)
It shows that the iconv not exist but the iconv has installed in my production env.
root@AY130/current# iconv --version
iconv (Ubuntu EGLIBC 2.15-0ubuntu10.4) 2.15
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Ulrich Drepper.
To resolve it, add this in your Gemfile:
gem "iconv", "~> 1.0.3"
Then run bundle install
.
Note: iconv has been deprecated for a while. It is replaced by (builtin) String#encode
See here: https://bbs.archlinux.org/viewtopic.php?id=160369