jump to navigation

Execute a Rake task from another task February 18, 2008

Posted by John Dewey in Example, Rake, Ruby.

Executing a Rake task from inside another Rake task is a nice addition to your toolshed.  Passing parameters to the Rake task is even cooler.  ‘Rake::Task[“TaskName”].execute’ and ‘Rake::Task[“TaskName”].invoke‘ to the rescue.  A Rakefile that demonstrates the execution of a task with parameter passing.


1. rikas - April 8, 2008

Nice, just what i needed.


2. danil - January 27, 2010

This thing I searched for.

3. Jonathan Rochkind - April 20, 2011

Sadly the pastie has expired. But it is exactly what I was looking for how to do. If you see this and still have it somewhere?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: