Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

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

#4248

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.

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

State: resolved
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. José Valim
    José Valim
    • State changed from new to resolved

    Yup, the comment as fixed, thanks!

    March 26th, 2010 @ 11:12 PM

  2. Ryan Bigg
    Ryan Bigg
    • Tag cleared.
    • Importance changed from to Low

    Automatic cleanup of spam.

    October 9th, 2010 @ 10:01 PM

  3. bingbing