Michael Johnston
2007-Apr-30 09:15 UTC
Help with "A copy of ApplicationController has been removed from the module tree but is still active!"
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 Johnston --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Michael Johnston
2007-Apr-30 09:29 UTC
Re: Help with "A copy of ApplicationController has been removed from the module tree but is still active!"
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 On 30-Apr-07, at 2:15 AM, Michael Johnston wrote:> > 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 Johnston > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---