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.

There was a problem

This is not a public project

This project is archived and is in readonly mode.

config.load_paths gone, but no deprecation warning.

#5001

Hi.

My app has the following in config/application.rb:

['posts', 'clusters', 'connections'].each do |dir|
  path = File.join(Rails.root, 'app', 'models', dir)
  config.load_paths << path
end

Which causes the following error:

[15:50][jnh@marvin]~/Dev/Kimono$ r s /Users/jnh/.rvm/gems/ruby-1.8.7-p249/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/railties/lib/rails/railtie/configuration.rb:76:in method_missing': undefined methodload_paths' for #<Rails::Application::Configuration:0x33deda4> (NoMethodError)

from /Users/jnh/Dev/Kimono/config/application.rb:48
from /Users/jnh/Dev/Kimono/config/application.rb:46:in `each'
from /Users/jnh/Dev/Kimono/config/application.rb:46
from /Users/jnh/.rvm/gems/ruby-1.8.7-p249/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/railties/lib/rails/commands.rb:28:in `require'
from /Users/jnh/.rvm/gems/ruby-1.8.7-p249/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/railties/lib/rails/commands.rb:28
from /Users/jnh/.rvm/gems/ruby-1.8.7-p249/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/railties/lib/rails/commands.rb:27:in `tap'
from /Users/jnh/.rvm/gems/ruby-1.8.7-p249/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/railties/lib/rails/commands.rb:27
from script/rails:9:in `require'
from script/rails:9

Should this not create a deprecation warning and send the request to config.autoload_paths?

I think commit 9b19a6f16cebf4257d2f0b839f6cc8ff5db5c47b caused this.

Reported by James Harton · June 29th, 2010 @ 05:36 AM

State: invalid
Milestone: none
Assigned to: José Valim José Valim
Importance: Low

Activity

  1. José Valim
    José Valim
    • Importance changed from to Low

    Please provide a patch that adds the required deprecations here:

    http://github.com/rails/rails/blob/master/railties/lib/rails/config...

    Thanks!

    June 29th, 2010 @ 09:13 AM

  2. Xavier Noria
    Xavier Noria

    Please if you do this patch say it will be removed in final. Rails 3 is gonna use autoload_paths.

    This is a change in a beta, RC will be frozen in this sense and won't have changes like this (unless something critical shows up, you know). So it is a warning just between beta and final.

    June 29th, 2010 @ 10:21 AM

  3. James Harton
    James Harton

    You don't think that the deprecation warning should be present in every release up to the point where it is removed?

    June 29th, 2010 @ 10:07 PM

  4. Xavier Noria
    Xavier Noria

    Yes, but there's no release of Rails 3 yet.

    The golden path for an application in Rails 2 is to first upgrade to the last 2.3, that is, the one released together with Rails 3. There you get rid of all warnings, and then you start with Rails 3 proper.

    In my view it is OK to break prereleases like that within some common sense, you know there's a lot going on occasionally some incompatibility is introduced for the benefit of final.

    That's why I didn't introduce a warning in master, if you are upgrading betas I prefer that the application clearly manifests you need to change that. Otherwise you may not notice until final, which is gonna be worse.

    June 29th, 2010 @ 10:26 PM

  5. José Valim
    José Valim

    Could someone please provide a patch or this can be closed?

    June 30th, 2010 @ 12:21 PM

  6. José Valim
    José Valim
    • State changed from new to invalid

    Ok, I'm closing this. If anyone feels like contributing a patch, I will reopen.

    July 8th, 2010 @ 10:13 PM