Wincent Colaiuta
2009-Feb-04 16:50 UTC
ActionController::Caching::Sweeper not autoloading in 2.3.0 RC1
Just updated to 2.3.0 RC1 and I''m finding that my sweepers are throwing NameErrors (uninitialized constant ActionController::Caching::Sweeper) when evaluation reaches lines like this one: class PostSweeper < ActionController::Caching::Sweeper This only happens in the development environment, because that''s the only environment where I have "cache_classes" set to false. Relevant stack trace is: vendor/rails/activesupport/lib/active_support/dependencies.rb:440:in `load_missing_constant'' vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in `const_missing'' app/sweepers/post_sweeper.rb:1 vendor/rails/activesupport/lib/active_support/dependencies.rb:380:in `load_without_new_constant_marking'' vendor/rails/activesupport/lib/active_support/dependencies.rb:380:in `load_file'' vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'' vendor/rails/activesupport/lib/active_support/dependencies.rb:379:in `load_file'' vendor/rails/activesupport/lib/active_support/dependencies.rb:259:in `require_or_load'' vendor/rails/activesupport/lib/active_support/dependencies.rb:425:in `load_missing_constant'' vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in `const_missing'' vendor/rails/activesupport/lib/active_support/dependencies.rb:92:in `const_missing'' vendor/rails/actionpack/lib/action_controller/caching/sweeping.rb: 43:in `const_get'' vendor/rails/actionpack/lib/action_controller/caching/sweeping.rb: 43:in `cache_sweeper'' vendor/rails/actionpack/lib/action_controller/caching/sweeping.rb: 41:in `each'' vendor/rails/actionpack/lib/action_controller/caching/sweeping.rb: 41:in `cache_sweeper'' app/controllers/posts_controller.rb:5 I can get rid of the error by manually adding the following at the top of the sweeper file: require ''rails/actionpack/lib/action_controller/caching/sweeping'' But that''s really bizarre, because I can see from the stack trace that that file has already been evaluated! Any idea what''s going on here? I created a fresh Rails app and tried to make a minimal test case but wasn''t able to reproduce, so there''s something subtle going on. Cheers, Wincent --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Wincent Colaiuta
2009-Feb-15 18:47 UTC
Re: ActionController::Caching::Sweeper not autoloading in 2.3.0 RC1
I''ve done a bit more digging and narrowed down the source of the bug. See: http://rails.lighthouseapp.com/projects/8994/tickets/1977 Cheers, Wincent --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---