small medium large xlarge

14 Apr 2009, 13:31
Ian Morrison (3 posts)

I’m working my through Chapter 13 on Internationalization. After creating the @config/initializers/i18n.rb@ file, I noticed the following warning in the server log:

depot/config/initializers/i18n.rb:11: warning: already initialized constant LOCALES_DIRECTORY
depot/config/initializers/i18n.rb:15: warning: already initialized constant LANGUAGES

Are these constants already defined by the framework? Regardless of the warning, everything seems to work OK.

Thanks, Ian

14 Apr 2009, 16:45
Sam Ruby (633 posts)

I’m not seeing that – under Rails 2.2.2 or Rails 2.3.2.

14 Apr 2009, 22:10
Ian Morrison (3 posts)

Sam - Thanks for the quick response. I upgraded from Ruby 1.8.6 to Ruby 1.8.7 thinking that might be the issue, but that didn’t help. As I mentioned, despite the warning message, everything works and I was able to successfully complete all of the examples in the Internationalization chapter. Grepping through libraries couldn’t locate anyone setting LANGUAGES or LOCALES_DIRECTORY explicitly, but I live with this small mystery. By the way, I’m using the JetBrains beta RubyMine IDE and have been very happy with the experience so far.

Thanks for a great book, I have really enjoyed getting this far.

You must be logged in to comment