Plugins within plugins

Hi all

I have a plugin which itself needs to load some plugins from its own
vendor/plugins directory.

I've spent half of this morning Googling about for answers but I
haven't found anything suitable yet.

I've been looking at adding plugin load paths to the host app's
initializer object from init.rb but, of course, that'll be useless
seeing as being in init.rb means that the plugin loader is already

Does anyone know of a solution that can be incorporated into a
plugin's init.rb file that'll load these "nested" plugins alongside
the host app's plugins? Or is there another Rails "best practice"
approach that I haven't found yet?

Any help greatly appreciated.


What if you simply add the additional plugins to your main
At least this is what I'm doing... I have 30+ engine plugins which
partly depend on each other. So we add whatever is required to the
main application. For testing each engine plugin still has to
reference all needed plugins but this is a different topic.


I don't have too many plugins so this is still an option. However, I'm
eventually going to roll this plugin into a gem and I want to deploy
it using a config.gem dependency. Having all the dependencies self-
contained would be a huge bonus when it comes to keeping all my apps
up to date as I can simply update the version of the gem being used.

If I'm not completely mistaken, using "bundler" should solve your
problem. You can define dependencies within you gem and bundler will
resolve the dependencies for you and install what is needed. This is
at least a possibility I wanted to invest for my setup once moved over
to Rails 3