no2w6g
Last Updated: January 16, 2018
·
2.295K
· 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

2354

Much simpler, and more acceptable is:

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

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

over 1 year ago ·