I''m trying to work out how to use the functionality from a plugin in an engine. It sounds weird, but it''s actually not so strange. I assume I can''t just add a vendor directory to an Engine, so some strategy for getting the plugin in the lib folder is probably necessary (and then requiring the plugin, perhaps?). -- Yehuda Katz -- Posted via http://www.ruby-forum.com/.
On 7/17/06, Yehuda Katz <wycats@gmail.com> wrote:> I''m trying to work out how to use the functionality from a plugin in an > engine. It sounds weird, but it''s actually not so strange. > > I assume I can''t just add a vendor directory to an Engine, so some > strategy for getting the plugin in the lib folder is probably necessary > (and then requiring the plugin, perhaps?). > > -- Yehuda KatzI think your saying you want to have an engine utilize a plugin? I''m not sure I ever tried that, but I do have plugins and engines being utilzed in the same app, it just worked. I would expect that same to be true of an engine that needs to utilize plugin code. i.e install your_plugin to vendors/plugins/your_plugin install the generic engines plugin to vendors/plugins/engines install your_engine into vendors/plugins/your_engine Then when your rails env. fire ups it will run the init.rb from both your_plugin and from the generic engines plugin, that should get the basic environment for both accessible, but your engine will not yet have been initialized. Then invoke Engines.start :your_engine from environment.rb. Where does the problem come in? Greg -- Greg Freemyer The Norcross Group Forensics for the 21st Century
I''d have preferred if I could get the plugins in the Engine, so people wouldn''t need to get a bunch of plugins to make my Engine work. That said, I could just say that certain features of the Engine require certain plugins. Greg Freemyer wrote:> I think your saying you want to have an engine utilize a plugin? > > I''m not sure I ever tried that, but I do have plugins and engines > being utilzed in the same app, it just worked. > > I would expect that same to be true of an engine that needs to utilize > plugin code. > > i.e > install your_plugin to vendors/plugins/your_plugin > install the generic engines plugin to vendors/plugins/engines > install your_engine into vendors/plugins/your_engine > > Then when your rails env. fire ups it will run the init.rb from both > your_plugin and from the generic engines plugin, that should get the > basic environment for both accessible, but your engine will not yet > have been initialized. > > Then invoke Engines.start :your_engine from environment.rb. > > Where does the problem come in? > > Greg > -- > Greg Freemyer > The Norcross Group > Forensics for the 21st Century-- Posted via http://www.ruby-forum.com/.
There are engines users and dev lists. If you want to pursue this, I would post on them. On 7/17/06, Yehuda Katz <wycats@gmail.com> wrote:> I''d have preferred if I could get the plugins in the Engine, so people > wouldn''t need to get a bunch of plugins to make my Engine work. That > said, I could just say that certain features of the Engine require > certain plugins. > > Greg Freemyer wrote: > > I think your saying you want to have an engine utilize a plugin? > > > > I''m not sure I ever tried that, but I do have plugins and engines > > being utilzed in the same app, it just worked. > > > > I would expect that same to be true of an engine that needs to utilize > > plugin code. > > > > i.e > > install your_plugin to vendors/plugins/your_plugin > > install the generic engines plugin to vendors/plugins/engines > > install your_engine into vendors/plugins/your_engine > > > > Then when your rails env. fire ups it will run the init.rb from both > > your_plugin and from the generic engines plugin, that should get the > > basic environment for both accessible, but your engine will not yet > > have been initialized. > > > > Then invoke Engines.start :your_engine from environment.rb. > > > > Where does the problem come in? > > > > Greg > > -- > > Greg Freemyer > > The Norcross Group > > Forensics for the 21st Century > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Greg Freemyer The Norcross Group Forensics for the 21st Century