Ruby on Rails/Built-In Rails Tools/Command-Line Reference

From Wikibooks, open books for an open world
Jump to navigation Jump to search
Previous: Built-In Rails Tools/Make your own rake tasks Index Next: ActiveRecord/Naming

Rake can be executed with the following command-line options:

  • --dry-run or -n: Do a dry run without executing actions
  • --help or -H: Display a help message
  • --libdir=LIBDIR or -I LIBDIR: Include LIBDIR in the search path for required modules
  • --rakelibdir=RAKELIBDIR or -R RAKELIBDIR: Auto-import any .rake files in RAKELIBDIR. (default is 'rakelib')
  • --nosearch or -N: Do not search parent directories for the Rakefile
  • --prereqs or -P: Display the tasks and dependencies, then exit
  • --quiet or -q: Do not log messages to standard output
  • --rakefile=FILE or -f FILE: Use FILE as the rakefile
  • --require=MODULE or -r MODULE: Require MODULE before executing rakefile
  • --silent or -s: Like --quiet, but also suppresses the 'in directory' announcement
  • --tasks[=PATTERN] or -T [PATTERN]: Display the tasks (matching optional PATTERN) with descriptions, then exit
  • --trace or -t: Turn on invoke/execute tracing, enable full backtrace
  • --usage or -h: Display usage
  • --verbose or -v: Log message to standard output (default)
  • --version or -V: Display the program version
  • --classic-namespace or -C: Put Task and FileTask in the top level namespace