This project is archived and is in readonly mode.

#4248 ✓resolved
Tadatoshi Takahashi

Custom I18n Configuration Setup: example of setting config.i18n.load_path in config/application.rb causes an error

Reported by Tadatoshi Takahashi | March 21st, 2010 @ 09:24 PM

In config/application.rb, there is an example code to add a load_path for I18n, i.e.
config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')]

When I uncommented this line and tried to start the server by "rails server", starting the server failed with an error message "config/application.rb:29:in []': can't convert Pathname into String (TypeError)".

As a work around, I changed it to
config.i18n.load_path += Dir[File.join(Rails.root, 'my', 'locales', '*.{rb,yml}')]

Then the server started successfully without the error.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>