Posted almost 6 years ago. Visible to the public.

Hide a Rake task from the `rake -T` list

A Rake task appears in rake -T if it has a description:

desc 'Compile assets' task :compile do ... end

To not list it, simply omit the description:

task :compile do ... end

You can also hide a Rake task that has been defined by someone else (like a gem) by removing the description:


Or you can whitelist which tasks should be listed:

visible_tasks = %w(compile build package) Rake::Task.tasks.each do |task| visible_tasks.include?( or task.clear_comments end

Does your version of Ruby on Rails still receive security updates?
Rails LTS provides security patches for unsupported versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2).

Owner of this card:

Henning Koch
Last edit:
almost 6 years ago
by Henning Koch
afterwards, after, the, fact, hindsight
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Henning Koch to makandra dev
This website uses short-lived cookies to improve usability.
Accept or learn more