This project is archived and is in readonly mode.

#5204 ✓invalid
Tadatoshi Takahashi

When a new Rails application is created by "rails new", autoload_paths instead of load_paths should be put in the generated application.rb

Reported by Tadatoshi Takahashi | July 27th, 2010 @ 12:52 AM

I have just switched my existing Rails 3.0.0.beta4 application to 3.0.0.rc.
And I got an error,

/Users/[user_name]/.rvm/gems/ruby-1.9.2-rc2/gems/railties-3.0.0.rc/lib/rails/railtie/configuration.rb:76:in method_missing': undefined methodload_paths' for #<Rails::Application::Configuration:0x00000102aba970> (NoMethodError)

In order to compare the difference, I have created a new Rails application by executing "rails new [application_name]". But "load_paths" was written in there.

So I looked at railties-3.0.0.beta4 gem and railties-3.0.0.rc gem. By tracing the code, I found that in Rails::Engine::Configuration, attr_writer is changed from load_paths to autoload_paths.

I think that in order to avoid the confusion, autoload_paths should be written in application.rb when a new 3.0.0.rc application is created by "rails new".

Comments and changes to this ticket

  • Tadatoshi Takahashi

    Tadatoshi Takahashi July 27th, 2010 @ 01:06 AM

    P.S. I have just found that unless there is a Gemfile specifying rails 3.0.0.rc, rails command in any directory still uses the one for 3.0.0.beta4.

    I apologize that I may have written the ticket too early and that I should investigate my environment more.

    Here is what I get in the directory with the Gemfile:
    $ rails --version Rails 3.0.0.rc

    And here is what I get in the directory without Gemfile:
    $ rails --version Rails 3.0.0.beta4

  • Rohit Arondekar

    Rohit Arondekar July 27th, 2010 @ 02:19 AM

    • State changed from “new” to “invalid”
    • Importance changed from “” to “Low”
  • Jeff Dean

    Jeff Dean July 30th, 2010 @ 05:41 AM

    Is there any reason not to deprecate load_paths? These seemingly arbitrary name changes, with no deprecation warnings, make it harder for people to upgrade. If I write the deprecation warning will you accept it?

  • Robert Pankowecki

    Robert Pankowecki August 3rd, 2010 @ 01:50 PM

    I had the same issue. It took me some time to fine that the method is now called ActiveSupport::Dependencies.autoload_paths instead of ActiveSupport::Dependencies.load_paths. Please use deprecations when making such changes.

  • Ryan Bigg

    Ryan Bigg October 11th, 2010 @ 10:58 AM

    • Tag cleared.

    Automatic cleanup of spam.

  • bingbing

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="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages