All posts tagged error

Solution for undefined method `alias_method_chain’ after upgrading to Rails 2.3.2

Tonight I was working on an old Rails app which I upgraded to Rails 2.3.2. All code went fine and on my local Mac installation all worked perfect. When I tried to deploy to the live environment I got the following strange error:

undefined method `alias_method_chain’ for I18n::Backend::Simple:Class

At first, I thought this had something to do with new i18n stuff in Rails 2.3.2 and after half an hour of Googling I finally got the answer. ActiveSupport and ActiveRecord in Rails now require ruby-iconv to be installed. This is probably available in most installations – because there where only 2 pages of unhelpfull answers on Google – but it wasn’t on my production environment.

I hope this blogpost will save you some Googling and it will fix the undefined method `alias_method_chain’ for I18n::Backend::Simple:Class error message. Also this error can happen with the following message: undefined method `silence_warnings’ for main:Object.

So the solution is: install ruby-iconv. If you’re running FreeBSD, that’s in /usr/ports/convertors/ruby-iconv (via: http://forums.freebsd.org/archive/index.php/t-763.html)