A copy of ApplicationController has been removed from the module tree but is still active!

Yes, more dependencies.rb fun!

As far as I'm able to ascertain, these errors started appearing after upgrading from Rails 2.3.1 to 2.3.2 and persist in 2.3.3.

They're highly nonderministic and appear rather sporadically, which makes it extremely frustrating. Multiple developers on our team have experienced this problem across varying versions of Ruby/Rails.

They're happening in two of our applications. These applications do not have any of the same plugins except AuthLogic. We are not using Rails Engines.

The two apps to share a number of gems which are initially loaded using my require_all gem (using config.gem in initialize.rb). I'm thinking this might be a potential source of the problems.

I have read about a number of people encountering this problem, and the general consensus about a workaround is to set the offending class as "unloadable". Will setting "unloadable" in ApplicationController propagate to the other controllers which subclass ApplicationController?

How do we trace down the actual cause of this problem and fix it?

I've not encountered this particular bug, but I wonder if it could be related to this from Lighthouse:

https://rails.lighthouseapp.com/projects/8994/tickets/1524

How exactly are you loading the shared gems?

--Matt Jones

I've not encountered this particular bug, but I wonder if it could be related to this from Lighthouse:

#1524 Gem plugins, autoloading, and dev mode reloading - Ruby on Rails - rails

We're loading our gems using config.gem, so I doubt that's the issue.

How exactly are you loading the shared gems?

They all subclass a base class which implements autoloading using require_all. This happens once when the Rails app is started, via config.gem in environment.rb