Rails Tip #7: Listing Rake Tasks
Rake is Ruby’s equivalent of the UNIX make build tool. You can list all of the Rake tasks available from within Rails using:
rake -T
—Note the uppercase “T”.
Rake is Ruby’s equivalent of the UNIX make build tool. You can list all of the Rake tasks available from within Rails using:
rake -T
—Note the uppercase “T”.
16 August 2006 at 1:23 am
rake has always been a bit of mystery to me, until recently. it’s amazing how much you use it once you know the full list of commands. I stumbled upon the full list in the RadRails IDE. You right-click on the Rails project and select, “Rake”, and it gives you the full list.
John, if you used Eclipse for your former Java development, you might like RadRails. I totally love it (except for the fact that it’s not a 1.0 application yet).
16 August 2006 at 6:55 am
Michael,
Unfortunately I’m not allowed to use Eclipse for the Java development I still do at work!
Anyway, I use TextMate for my Rails work - I figured that if it’s good enough for the Rails core team then it’s good enough for me…
16 August 2006 at 11:19 pm
Having RadRails actually made the transition more comfortable for me. If nothing more than a providing a familiar look & feel for my programming.
17 August 2006 at 7:56 am
I’ll take a look at the RadRails screencast when I have time. I have to stick with TextMate though because I’ve paid for it! And I love it…
17 August 2006 at 7:03 pm
Michael,
Does RadRails give you IntelliSense (auto-completion) for Ruby code?
19 August 2006 at 5:50 pm
Hi John, no it doesn’t. I believe their blog said it will in the future.
26 October 2006 at 8:14 am
Remember you can run ‘rake’ in any folder that has a Rakefile in it. Thusforthly, ‘rake -T’ or ‘rake –tasks’ will work there too.
Double bonus remember: rake files are just Ruby files with a .rake extension. Put any Ruby in there you like (e.g. load more rake files from around the place). This is how the Rakefile in Rails application root folders works: it pulls in lots of rake files from rails installation, lib/tasks, and plugins etc. Fun stuff.
26 October 2006 at 8:24 am
Excellent points, Dr Nic - thanks!