I'm trying to run a list of rake task within a shared :namespace
following this post: How do I run all rake tasks?.
But its not working.
Recommendation per post
desc "perform all scraping"
task :scrape do
Rake::Task[:scrape_nytimes].execute
Rake::Task[:scrape_guardian].execute
end
The difference in my case is that all rake tasks are in a namespace.
Rake tasks
namespace :get_ready do
task check_weather: :environment do
p 1
end
task make_lunch: :environment do
p 2
end
task start_car: :environment do
p 3
end
end
Attempting to create a rake task that runs all rake tasks as below.
desc "Run all tasks"
task run_all: :environment do
Rake::Task[:check_weather].execute
Rake::Task[:make_lunch].execute
Rake::Task[:start_car].execute
end
And then running with rake run_all
or rake get_ready
. The below variations I tried also didn't work.
Rake::Task[run_all:check_weather].execute
Rake::Task[:run_all, :check_weather].execute
Does anyone have experience running a batch of rake tasks in a shared namespace and knows how to do this?