Installing REE with rbenv with iconv support and Homebrew
I picked up a new Mac Mini recently and have been experimenting with rbenv instead of RVM. For some reason, one of my projects was giving me the following error when attempting to start the project (through the Rails console and through pow as well).
...action_controller/cgi_ext/stdinput.rb:14:in `included': undefined method `alias_method_chain' for CGI:Class (NoMethodError).
This error comes up when the Ruby version that you’re using isn’t compiled with iconv support. With rbenv, you can compile iconv support with the following command:
CONFIGURE_OPTS="-c --with-iconv-dir=/usr/local/Cellar/libiconv/1.14" rbenv install ree-1.8.7-2011.03
I should note that I lost quite a bit of time trying to target libiconv with version 1.13. I don’t know if this is a problem with libiconv 1.13 or it was something with my specific version, but once I upgraded to version 1.14, I was able to make it work.