How to run a rake task from plugin's install.rb?

Hello,
I wrote a plugin that adds some rake tasks. Upon installation of my
plugin, I would like one of these rake tasks to be run. How do I do
that in install.rb?

Thank you.

On 10/21/07, Christopher J. Bottaro [email protected] wrote:

Hello,

Hello.

I wrote a plugin that adds some rake tasks. Upon installation of my
plugin, I would like one of these rake tasks to be run. How do I do
that in install.rb?

Rake::Task[‘task:name’].invoke


Chris W.
http://errfree.com // http://errtheblog.com

On Oct 22, 2:46 am, “Chris W.” [email protected] wrote:

Rake::Task[‘task:name’].invoke

I tried that and then ‘script/plugin install’ wouldn’t install it
cleanly anymore.

When a plugin is installed, how/when is the install.rb file invoked?
I mean, in that file, can I count on the Rails environment already
being loaded?

Also, how do I test that file? I can’t simply say “ruby install.rb”
unless I load all the environment stuff myself in that file.

Thanks for the help.