aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/commands.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/commands.rb')
-rw-r--r--railties/lib/rails/commands.rb6
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