John Topley’s Weblog

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”.

Comments

There are 8 comments on this post. Comments are closed.

  • avatar Michael Sica
    16 August 2006 at 01:23

    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).

  • avatar John Topley
    16 August 2006 at 06:55

    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...

  • avatar Michael Sica
    16 August 2006 at 23:19

    Having RadRails actually made the transition more comfortable for me. If nothing more than a providing a familiar look & feel for my programming.

  • avatar John Topley
    17 August 2006 at 07:56

    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...

  • avatar John Topley
    17 August 2006 at 19:03

    Michael,

    Does RadRails give you IntelliSense (auto-completion) for Ruby code?

  • avatar Michael Sica
    19 August 2006 at 17:50

    Hi John, no it doesn't. I believe their blog said it will in the future.

  • avatar Dr Nic
    26 October 2006 at 08:14

    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.

  • avatar John Topley
    26 October 2006 at 08:24

    Excellent points, Dr Nic - thanks!


Archives

  • Jan
  • Feb
  • Mar
  • Apr
  • May
  • Jun
  • Jul
  • Aug
  • Sep
  • Oct
  • Nov
  • Dec
  • 2019
  • 2018
  • 2017
  • 2016
  • 2015
  • 2014

More Archives


Sign In