From d578cbfb5c9fa353ce041bc826e13905910e2d2a Mon Sep 17 00:00:00 2001 From: Damien Mathieu Date: Thu, 19 Mar 2015 10:06:28 +0100 Subject: don't fallback to RACK_ENV when RAILS_ENV is not present --- railties/lib/rails/commands/console.rb | 2 +- railties/lib/rails/commands/dbconsole.rb | 2 +- railties/lib/rails/commands/runner.rb | 2 +- railties/lib/rails/commands/server.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'railties/lib/rails') diff --git a/railties/lib/rails/commands/console.rb b/railties/lib/rails/commands/console.rb index 5d37a2b699..48b1ad884b 100644 --- a/railties/lib/rails/commands/console.rb +++ b/railties/lib/rails/commands/console.rb @@ -57,7 +57,7 @@ module Rails end def environment - options[:environment] ||= ENV['RAILS_ENV'] || ENV['RACK_ENV'] || 'development' + options[:environment] ||= ENV['RAILS_ENV'] || 'development' end def environment? diff --git a/railties/lib/rails/commands/dbconsole.rb b/railties/lib/rails/commands/dbconsole.rb index 5175e31f14..be0c0fc659 100644 --- a/railties/lib/rails/commands/dbconsole.rb +++ b/railties/lib/rails/commands/dbconsole.rb @@ -107,7 +107,7 @@ module Rails if Rails.respond_to?(:env) Rails.env else - ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "development" + ENV["RAILS_ENV"] || "development" end end diff --git a/railties/lib/rails/commands/runner.rb b/railties/lib/rails/commands/runner.rb index 86bce9b2fe..66a9ebf38c 100644 --- a/railties/lib/rails/commands/runner.rb +++ b/railties/lib/rails/commands/runner.rb @@ -1,6 +1,6 @@ require 'optparse' -options = { environment: (ENV['RAILS_ENV'] || ENV['RACK_ENV'] || "development").dup } +options = { environment: (ENV['RAILS_ENV'] || "development").dup } code_or_file = nil if ARGV.first.nil? diff --git a/railties/lib/rails/commands/server.rb b/railties/lib/rails/commands/server.rb index 546d3725d8..397a9cf406 100644 --- a/railties/lib/rails/commands/server.rb +++ b/railties/lib/rails/commands/server.rb @@ -95,7 +95,7 @@ module Rails super.merge({ Port: 3000, DoNotReverseLookup: true, - environment: (ENV['RAILS_ENV'] || ENV['RACK_ENV'] || "development").dup, + environment: (ENV['RAILS_ENV'] || "development").dup, daemonize: false, pid: File.expand_path("tmp/pids/server.pid"), config: File.expand_path("config.ru") -- cgit v1.2.3