A frustrating and strange error when config.action_controller.perform_caching = true

Hello all.

I am having a hell of a problem and it’s driving me
nuts. I get the following error (undefined method `controller_name’ for
nil:NilClass): but only when config.action_controller.

perform_caching = true

I googled around some and found this thread http://groups.google.com/group/communityengine/browse_thread/thread/b84154e5228bf9f3 which suggests it may be a conflict with a pllug in controller but I don’t see any two controllers with the same name.

This particular controller is using activescaffold and I think that
might be a part of the problem though I can’t be sure. As you can see
from the stacktrace rails has finished rendering the page and seems to
throw a fit during sweeping.rb. Also none of my controllers are
mentioned in the stacktrace.

What can I do to figure out why this is failing? This is driving me nuts.

End of component rendering
2009-04-17T13:22:22+01:00 : DEBUG : Rendered match/_provider_summary (37.0ms)
2009-04-17T13:22:22+01:00 : FATAL :

NoMethodError (undefined method controller_name' for nil:NilClass): /vendor/rails/actionpack/lib/action_controller/caching/sweeping.rb:83:in callback’
/vendor/rails/actionpack/lib/action_controller/caching/sweeping.rb:65:in `after’

/vendor/rails/actionpack/lib/action_controller/filters.rb:208:in `around_proc'
/vendor/rails/activesupport/lib/active_support/callbacks.rb:182:in `call'
/vendor/rails/activesupport/lib/active_support/callbacks.rb:182:in `evaluate_method'

/vendor/rails/actionpack/lib/action_controller/filters.rb:184:in `call'
/vendor/rails/actionpack/lib/action_controller/filters.rb:635:in `run_before_filters'
/vendor/rails/actionpack/lib/action_controller/filters.rb:615:in `call_filters'

/vendor/rails/actionpack/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark'
/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'

/usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'
/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/vendor/rails/actionpack/lib/action_controller/rescue.rb:136:in `perform_action_without_caching'

/vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb:13:in `passenger_orig_perform_action'
/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'

/vendor/rails/activerecord/lib/active_record/query_cache.rb:8:in `cache'
/vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb:12:in `passenger_orig_perform_action'
/usr/local/lib/ruby/gems/1.8/gems/passenger-2.1.3/lib/phusion_passenger/railz/request_handler.rb:53:in `perform_action'

/vendor/rails/actionpack/lib/action_controller/base.rb:524:in `send'
/vendor/rails/actionpack/lib/action_controller/base.rb:524:in `process_without_filters'
/vendor/rails/actionpack/lib/action_controller/filters.rb:606:in `process_without_session_management_support'

/vendor/rails/actionpack/lib/action_controller/session_management.rb:134:in `process'
/vendor/rails/actionpack/lib/action_controller/base.rb:392:in `process'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:183:in `handle_request'

/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:110:in `dispatch_unlocked'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:123:in `dispatch'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:122:in `synchronize'

/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:122:in `dispatch'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:132:in `dispatch_cgi'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:39:in `dispatch'

/usr/local/lib/ruby/gems/1.8/gems/passenger-2.1.3/lib/phusion_passenger/railz/request_handler.rb:38:in `process_request'
/usr/local/lib/ruby/gems/1.8/gems/passenger-2.1.3/lib/phusion_passenger/abstract_request_handler.rb:197:in `main_loop'

/usr/local/lib/ruby/gems/1.8/gems/passenger-2.1.3/lib/phusion_passenger/railz/application_spawner.rb:340:in `start_request_handler'
/usr/local/lib/ruby/gems/1.8/gems/passenger-2.1.3/lib/phusion_passenger/railz/application_spawner.rb:298:in `handle_spawn_application'

/usr/local/lib/ruby/gems/1.8/gems/passenger-2.1.3/lib/phusion_passenger/utils.rb:176:in `safe_fork'
/usr/local/lib/ruby/gems/1.8/gems/passenger-2.1.3/lib/phusion_passenger/railz/application_spawner.rb:296:in `handle_spawn_application'

/usr/local/lib/ruby/gems/1.8/gems/passenger-2.1.3/lib/phusion_passenger/abstract_server.rb:332:in `__send__'
/usr/local/lib/ruby/gems/1.8/gems/passenger-2.1.3/lib/phusion_passenger/abstract_server.rb:332:in `main_loop'

/usr/local/lib/ruby/gems/1.8/gems/passenger-2.1.3/lib/phusion_passenger/abstract_server.rb:182:in `start_synchronously'
/usr/local/lib/ruby/gems/1.8/gems/passenger-2.1.3/lib/phusion_passenger/abstract_server.rb:149:in `start'

/usr/local/lib/ruby/gems/1.8/gems/passenger-2.1.3/lib/phusion_passenger/railz/application_spawner.rb:192:in `start'
/usr/local/lib/ruby/gems/1.8/gems/passenger-2.1.3/lib/phusion_passenger/spawn_manager.rb:260:in `spawn_rails_application'

/usr/local/lib/ruby/gems/1.8/gems/passenger-2.1.3/lib/phusion_passenger/abstract_server_collection.rb:121:in `lookup_or_add'
/usr/local/lib/ruby/gems/1.8/gems/passenger-2.1.3/lib/phusion_passenger/spawn_manager.rb:254:in `spawn_rails_application'

/usr/local/lib/ruby/gems/1.8/gems/passenger-2.1.3/lib/phusion_passenger/abstract_server_collection.rb:75:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/passenger-2.1.3/lib/phusion_passenger/abstract_server_collection.rb:74:in `synchronize'

/usr/local/lib/ruby/gems/1.8/gems/passenger-2.1.3/lib/phusion_passenger/spawn_manager.rb:253:in `spawn_rails_application'
/usr/local/lib/ruby/gems/1.8/gems/passenger-2.1.3/lib/phusion_passenger/spawn_manager.rb:148:in `spawn_application'

/usr/local/lib/ruby/gems/1.8/gems/passenger-2.1.3/lib/phusion_passenger/spawn_manager.rb:285:in `handle_spawn_application'
/usr/local/lib/ruby/gems/1.8/gems/passenger-2.1.3/lib/phusion_passenger/abstract_server.rb:332:in `__send__'

/usr/local/lib/ruby/gems/1.8/gems/passenger-2.1.3/lib/phusion_passenger/abstract_server.rb:332:in `main_loop'
/usr/local/lib/ruby/gems/1.8/gems/passenger-2.1.3/lib/phusion_passenger/abstract_server.rb:182:in `start_synchronously'

/usr/local/lib/ruby/gems/1.8/gems/passenger-2.1.3/bin/passenger-spawn-server:50