class

Rails::CommandsTasks

v4.1.8 - Show latest stable - Superclass: Object

This is a class which takes in a rails command and initiates the appropriate initiation sequence.

Warning: This class mutates ARGV because some commands require manipulating it before they are run.

Constants

COMMAND_WHITELIST = %w(plugin generate destroy console server dbconsole application runner new version help)

HELP_MESSAGE = <<-EOT\nUsage: rails COMMAND [ARGS]\n\nThe most common rails commands are:\ngenerate Generate new code (short-cut alias: "g")\nconsole Start the Rails console (short-cut alias: "c")\nserver Start the Rails server (short-cut alias: "s")\ndbconsole Start a console for the database specified in config/database.yml\n(short-cut alias: "db")\nnew Create a new Rails application. "rails new my_app" creates a\nnew application called MyApp in "./my_app"\n\nIn addition to those, there are:\napplication Generate the Rails application code\ndestroy Undo code generated with "generate" (short-cut alias: "d")\nplugin new Generates skeleton for developing a Rails plugin\nrunner Run a piece of code in the application environment (short-cut alias: "r")\n\nAll commands can be run with -h (or --help) for more information.\nEOT

Attributes

[R]argv

Files

  • railties/lib/rails/commands/commands_tasks.rb