Hey did you just read my email before posting that? If not, that was a scary coincidence.
Question about your solution ... Which init.rb do you paste that code? In the engines plugin or the plugin that is relying on engines? Sean On Jan 5, 2008 1:46 PM, Pascal Rettig <[EMAIL PROTECTED]> wrote: > Hi All, > > I'm pretty new to Engines, but in upgrading a Rails application to 2.0 > I decided to move a bunch of modules from the deprecated "components" > directory to a new "vendor/modules" directory and Engines seemed like > the best drop-in replacement to do so. > Everything was great in production mode, but in development mode I kept > getting a bunch of strange errors of two different sorts: > > - Method missing errors from Models that were defined in the code > > - "A copy of XXX has been removed from the module tree but is still > active!" errors for Application Controllers > > This is probably old hat to people who have been using engines for a > while, but I need to add the following to my init.rb to solve the > issues: > > load_paths.each do |path| > Dependencies.load_once_paths.delete(path) > end > > > The reason for my issues is that I'm using the engine plugins in a way > that they refer back to models and controllers in the main application, > so they need to be reloaded in a similar method to the main application > controllers & models or the class constant references will become stale > on page refreshes. > > Took me a couple hours of head banging on keyboard to figure this out so > maybe this info will help someone else. > > -Pascal > > _______________________________________________ > Engine-Users mailing list > [email protected] > http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org > _______________________________________________ Engine-Users mailing list [email protected] http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org
