Using ruby-gettext with Edge Rails
The more I read about the various new features coming up in Rails 2.0, the more I couldn't resist... and finally, a few days ago, I switched over to Edge Rails with my current project.
Switching to Edge Rails was easily done, however after fireing up /script/server
and doing the first request, I was presented with a 500 Internal Server Error.
DISPATCHER FAILSAFE RESPONSE (has cgi) Sun Jul 29 12:43:56 +0200 2007
Status: 500 Internal Server Error
You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.\[]
/usr/lib64/ruby/1.8/cgi.rb:1165:in '\[]'
/usr/lib64/ruby/gems/1.8/gems/gettext-1.10.0/lib/gettext/locale_cgi.rb:26:in 'system'
/usr/lib64/ruby/gems/1.8/gems/gettext-1.10.0/lib/gettext/locale.rb:88:in 'system'
/usr/lib64/ruby/gems/1.8/gems/gettext-1.10.0/lib/gettext/locale.rb:96:in 'default'
After some time of debugging, it turned out to be ruby-gettext, which I use for I18N, that causes a NoMethodError on each request during init-gettext.