Plugins and Engines

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 K.

On 7/17/06, Yehuda K. [email protected] 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 K.

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 F.
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 F. 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 F.
The Norcross Group
Forensics for the 21st Century

There are engines users and dev lists.

If you want to pursue this, I would post on them.

On 7/17/06, Yehuda K. [email protected] wrote:

basic environment for both accessible, but your engine will not yet
Forensics for the 21st Century


Posted via http://www.ruby-forum.com/.


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


Greg F.
The Norcross Group
Forensics for the 21st Century

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs