"translation missing" errors in production, not in development

479 views
Skip to first unread message

Luigi Montanez

unread,
Feb 4, 2009, 12:45:39 AM2/4/09
to rails-i18n
I've been trying to wrap my head around this for a while now, but no
luck:

$ script/console development
Loading development environment (Rails 2.3.0)
>> I18n.t :are_you_sure
=> "Are you sure?"

$ script/console production
Loading development environment (Rails 2.3.0)
>> I18n.t :are_you_sure
=> "translation missing: en-US, are_you_sure"

But, load_path, locale, and default_locale are all exactly the same
between development and production. I definitely made sure that
load_path was correct in production.

All my I18N config is in environment.rb -- nothing in development.rb
nor production.rb. I'm riding Edge Rails.

One thing I am doing differently is that I'm using *.rb files for the
locale files instead of *.yml, but it seemed to work fine before.

Anyone run into anything similar?

Luigi Montanez

unread,
Feb 4, 2009, 9:59:29 AM2/4/09
to rails-i18n
Update:

I resolved the issue with a call to 'I18n.reload!' in environment.rb,
underneath my call to I18n.load_path.

Not sure why I had to do that though...

dirk

unread,
Feb 9, 2009, 2:01:02 AM2/9/09
to rails-i18n
Thanks Luigi, that works!
Reply all
Reply to author
Forward
0 new messages