On Dec 11, 2007 9:31 PM, Tony Arcieri <[EMAIL PROTECTED]> wrote: > I'm trying to map.from_plugin :my_engine in the routes.rb for my application > > The problem appears to be that at the time routes.rb has been processed the > Engines plugin itself is loaded but my Engine has not.
If your plugin hasn't been loaded yet, are you sure it ever loads? Routing is not initialized until *after* all the plugins have been loaded (see line 105 vs 114 of initializer.rb), so it doesn't seem to make sense that your plugin wouldn't be in the Engines.plugins structure. Does it definitely have a lib and/or init.rb file? Regarding your implementation ideas, they would side-step the plugin loading process. I'd consider making Routes#from_plugin do nothing if the plugin could not be found, since that would gracefully work as you removed plugins from config.plugins, but that still wouldn't help your problem. The key here is why your plugin isn't present in Engines.plugins at the point the routes file is loaded. Could you pepper the init.rb files in your app with puts statements so we can trace what's going on? Cheers, -- * J * ~ _______________________________________________ Engine-Developers mailing list [email protected] http://lists.rails-engines.org/listinfo.cgi/engine-developers-rails-engines.org
