Ok, after quite some reading through the Rails 2.0 plugin load process I've been able to come up with my own stab at this now.
See this patch: http://pastie.caboo.se/120187 and the top portion of environment.rb here: http://pastie.caboo.se/120188 I've added a PluginLocator (extending the Rails::Plugin::FileSystemLocator) instead of a PluginLoader because that's the class that is responsible for finding and instantiating plugins in Rails 2.0 Also I've changed the Engines Plugin class to extend the Rails::Plugin class. I've tried this with Gwyn Morfey's Macaque engine and it exports the migrations with script/generate plugin_migration. Also Mongrel starts up and I can access the MacaqueController with the appropriate views etc. I'm still super-curious about what's necessary to get an official Engines version for Rails 2.0 going. Thanks! Am 20.11.2007 um 14:15 schrieb Sven Fuchs: > Hi everybody, > > I'm highly interested in getting a working Engines setup running on > Rails 2.0 as soon as possible. I have convinced a customer to use > Engines to slice up a huge Rails app but he wants it to run Rails 2.0 > > I already mailed with Josh Ferguson who wrote the "initial hack" > posted here: http://dev.rails-engines.org/engines-plugin/tickets/267 > and he kindly send me his entire Engines plugin directory. > > I can't seem to get it working though at all. Basically I've set up a > fresh Rails app and added the Engines::PluginLoader like given in the > ticket above. In environment.rb I added below the boot.rb require > line: > > require File.join(File.dirname(__FILE__), '../vendor/plugins/engines/ > lib/engines/plugin_loader') > > And in vendor/plugins/engines/lib/engines/rails_extensions/rails.rb at > the top: > > require 'active_support' > > Mongrel will then die with the error: > > vendor/rails/railties/lib/initializer.rb:193:in `initialize': wrong > number of arguments (1 for 2) (ArgumentError) > > Not sure what's wrong here. Looking at the #initialize method of the > Engines::PluginLoader that fails here this very much looks like the > #initialize method of the Engines Plugin class. > > Can anybody help me out with this? Probably someone has running Rails > 2.0 application set up with Engines and can zip me up the whole > application as a starting point? > > I'm eager to get something up and running by Wednesday evening because > I want to present it to a customer who wants to slice up a huge Rails > app and Engines seems to be the perfect choice for that. It has to > work with Rails 2.0 though. > > Also ... I'd be interested in learning if there's any work in progress > for an official version of Engines for Rails 2.0. > > Thanks a lot for any pointers! > > > -- > sven fuchs [EMAIL PROTECTED] > artweb design http://www.artweb-design.de > grünberger 65 + 49 (0) 30 - 47 98 69 96 (phone) > d-10245 berlin + 49 (0) 171 - 35 20 38 4 (mobile) > > > > _______________________________________________ > Engine-Users mailing list > [email protected] > http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org -- sven fuchs [EMAIL PROTECTED] artweb design http://www.artweb-design.de grünberger 65 + 49 (0) 30 - 47 98 69 96 (phone) d-10245 berlin + 49 (0) 171 - 35 20 38 4 (mobile) _______________________________________________ Engine-Users mailing list [email protected] http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org
