List Rake Tasks by Default

Posted on Sun 27 January 2013 in development

I add this to all my Rakefiles.

task :default do
  system "rake --tasks"
end

It prints a list of Rake tasks when you run Rake without a command. Not only does it help you remember what options are available in the current project, but it keeps you from accidentally performing some task if you fat-finger the rake command.