aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/commands/server.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/railties/lib/commands/server.rb b/railties/lib/commands/server.rb
index d21e91f980..375fb4df07 100644
--- a/railties/lib/commands/server.rb
+++ b/railties/lib/commands/server.rb
@@ -47,6 +47,8 @@ ARGV.options do |opts|
end
ENV["RAILS_ENV"] = OPTIONS[:environment]
+RAILS_ENV.replace(OPTIONS[:environment]) if defined?(RAILS_ENV)
+
require RAILS_ROOT + "/config/environment"
require 'webrick_server'