Forum: Ruby on Rails ActionController::Caching::Sweeper not autoloading

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Olly L. (Guest)
on 2009-05-08 17:58
(Received via mailing list)

I've been following this issue on Lighthouse (https://
actioncontrollercachingsweeper-autoloading-is-broken).  I've since
upgraded to 2-3-stable which contain's Josh's fix, but I'm still
seeing the same error:

         `load_missing_constant': uninitialized constant
ActionController::Caching::Sweeper (NameError)

I've tried a variety of fixes as suggested in the Lighthouse comments,
all to no avail.  The only way I can get my app to start is by

class MySweeper < ActionController::Caching::Sweeper


require 'rails/actionpack/lib/action_controller/caching/sweeper'
class MySweeper < ActionController::Caching::Sweeping::Sweeper

This is clearly wrong.

Can anyone help?

My environment.rb file is as follows, if this helps? do |config|
      %w(sweepers observers accounting).each do |dir|
        config.load_paths << "#{RAILS_ROOT}/app/#{dir}"
      config.cache_store = :file_store, "#{RAILS_ROOT}/tmp/cache"
      config.active_record.observers = :my_sweeper
      config.active_record.default_timezone = :utc
      config.action_controller.session_store = :active_record_store
      config.action_mailer.default_charset = "utf-8"
This topic is locked and can not be replied to.