aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/commands/server.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/commands/server.rb')
-rw-r--r--railties/lib/rails/commands/server.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/railties/lib/rails/commands/server.rb b/railties/lib/rails/commands/server.rb
index 09d7207d51..b21ae2a17b 100644
--- a/railties/lib/rails/commands/server.rb
+++ b/railties/lib/rails/commands/server.rb
@@ -38,15 +38,14 @@ module Rails
end
def start
+ ENV["RAILS_ENV"] = options[:environment]
+
puts "=> Booting #{ActiveSupport::Inflector.demodulize(server)}"
- puts "=> Rails #{Rails.version} application starting on http://#{options[:Host]}:#{options[:Port]}"
+ puts "=> Rails #{Rails.version} application starting in #{Rails.env} on http://#{options[:Host]}:#{options[:Port]}"
puts "=> Call with -d to detach" unless options[:daemonize]
trap(:INT) { exit }
puts "=> Ctrl-C to shutdown server" unless options[:daemonize]
- ENV["RAILS_ENV"] = options[:environment]
- RAILS_ENV.replace(options[:environment]) if defined?(RAILS_ENV)
-
super
ensure
puts 'Exiting' unless options[:daemonize]