Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to list all Rails 3 rake tasks? rake -T seems incomplete [duplicate]

Possible Duplicate:
Why is rake db:migrate:reset not listed in rake -T?

Inside my Rails (3.1.3) application, I can run rake db:test:prepare. But when I run rake -T [db], that task (and many others I can use) does not show up.

How do I get a complete list of tasks, or why is it incomplete in the first place?

E.g. http://mindspill.net/computing/cross-platform-notes/ruby-on-rails/how-to-list-rake-tasks/ shows that the 'db:test:prepare' task got listed for an older Rails version when running rails -T.

like image 669
Felix Rabe Avatar asked Jan 03 '12 11:01

Felix Rabe


2 Answers

I found at Why is rake db:migrate:reset not listed in rake -T? (thanks @Beerlington for the link) that rake -P lists all tasks, which is what I was looking for.

like image 86
Felix Rabe Avatar answered Sep 21 '22 00:09

Felix Rabe


Only tasks with descriptions set will appear in rake -T.

As for why not all tasks have descriptions.... that I don't know.

like image 30
sevenseacat Avatar answered Sep 20 '22 00:09

sevenseacat