Last Updated: January 16, 2018
·
7.079K
· felipeelias

Invoke a rake task from another task

Simply call #invoke

task :invoke_another_task do
  # some code
  Rake::Task["another:task"].invoke
end

2 Responses
Add your response

Much simpler, and more acceptable is:

task :invoke_another_task => %w[another:task one:another:task]
over 1 year ago ·

@hauleth yeah, I use this too :) but when you need more code around, this might be useful at some point

over 1 year ago ·