Rakefile.rb
namespace :n do
desc "Task 1"
task :t1 do
puts "t1"
end
desc "Task 2"
task :t2 => [:t1] do
puts "t2"
end
end
task default: "n:t2"
Show the defined task.
% rake -T
rake n:t1 # Task 1
rake n:t2 # Task 2
Run the default task.
% rake
t1
t2