# Help with "A copy of ApplicationController has been removed

**URL:** <https://www.ruby-forum.com/t/help-with-a-copy-of-applicationcontroller-has-been-removed/93278>\
**Category:** Rails\
**Created:** [April 30, 2007, 11:16am UTC](https://www.ruby-forum.com/t/help-with-a-copy-of-applicationcontroller-has-been-removed/93278 "2007-04-30T11:16:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bluetrust](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e7dd6/32.png) [@bluetrust](https://www.ruby-forum.com/u/bluetrust)\
**Post date:** [April 30, 2007, 11:16am UTC](https://www.ruby-forum.com/t/help-with-a-copy-of-applicationcontroller-has-been-removed/93278/1 "2007-04-30T11:16:20Z")

</div>

Hi,

I am on Edge Rails, hence with the new dependencies mechanism.

I am trying to get the plugin “acts\_as\_wizard” (to work.

I have refactored it to use the new plugin loading system, as best I  
know how:

Key part:

module ActsAsWizard  
module ActionControllerExtensions

```
def self.append_features(base)
  super
  base.class_eval do
    cattr_accessor :wizards # Hash, contains all the wizards this

```

controller participates in  
alias\_method :original\_url\_for, :url\_for  
alias\_method :original\_render, :render  
prepend\_before\_filter WizardSetupFilter  
end  
end

…etc…

Note I changed the filter to prepend.

THis may be related to the problem I have, which is that when I am in  
a wizard, in one of my before\_filters defined in my  
ApplicationController, I get a “A copy of ApplicationController has  
been removed from the module tree but is still active!” error halfway  
through the filter.

Does anyone have any idea what sort of thing causes such an error? or  
just any tips for debugging problems with the edge rails dependencies  
mechanism. It’s really opaque to me at this point.

Michael J.

---

<div class="post-metadata">

**Author:** ![bluetrust](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e7dd6/32.png) [@bluetrust](https://www.ruby-forum.com/u/bluetrust)\
**Post date:** [April 30, 2007, 11:30am UTC](https://www.ruby-forum.com/t/help-with-a-copy-of-applicationcontroller-has-been-removed/93278/2 "2007-04-30T11:30:23Z")

</div>

If I do this: config.load\_once\_paths += %W{ #{RAILS\_ROOT}/app/  
controllers }

things work. But I really hope there is another solution and I am not  
doomed to have to restart the development server for every controller  
change for the rest of the life of the project.

Michael
