Forum: Ruby on Rails Help with "A copy of ApplicationController has been removed

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.
Michael J. (Guest)
on 2007-04-30 13:16
(Received via mailing list)

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)
      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


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.
Michael J. (Guest)
on 2007-04-30 13:30
(Received via mailing list)
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.

This topic is locked and can not be replied to.