diff options
author | Mikel Lindsaar <raasdnil@gmail.com> | 2010-06-03 23:47:44 +1000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2010-06-04 12:30:03 -0500 |
commit | 4774680405adcbf0d3f64abbc236c7653d137fa3 (patch) | |
tree | eb9594758b5842d7a922782b2c0e45f2138bb2ee /railties/lib/rails/commands.rb | |
parent | 517f709b51d1d2766d1a783d9f02fa7a6a41abc4 (diff) | |
download | rails-4774680405adcbf0d3f64abbc236c7653d137fa3.tar.gz rails-4774680405adcbf0d3f64abbc236c7653d137fa3.tar.bz2 rails-4774680405adcbf0d3f64abbc236c7653d137fa3.zip |
Changing command line API from 'rails blog' to 'rails new blog'.
Also removed the limitation of not being able to call your new server any of
the rails commands (generate, server, dbconsole, console etc) as there is
no longer any ambiguity here.
http://rails.lighthouseapp.com/projects/8994/tickets/4665
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
Diffstat (limited to 'railties/lib/rails/commands.rb')
-rw-r--r-- | railties/lib/rails/commands.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/railties/lib/rails/commands.rb b/railties/lib/rails/commands.rb index de93a87615..aad1170b56 100644 --- a/railties/lib/rails/commands.rb +++ b/railties/lib/rails/commands.rb @@ -38,6 +38,10 @@ when 'dbconsole' when 'application', 'runner' require "rails/commands/#{command}" +when 'new' + puts "Can't initialize a new Rails application within the directory of another, please change to a non-Rails directory first.\n" + puts "Type 'rails' for help." + when '--version', '-v' ARGV.unshift '--version' require 'rails/commands/application' @@ -53,6 +57,8 @@ The most common rails commands are: server Start the Rails server (short-cut alias: "s") dbconsole Start a console for the database specified in config/database.yml (short-cut alias: "db") + new Create a new Rails application. "rails new my_app" creates a + new application called MyApp in "./my_app" In addition to those, there are: application Generate the Rails application code |