diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2015-03-19 07:46:57 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2015-03-19 07:46:57 -0700 |
commit | 7bdc7635b885e473f6a577264fd8efad1c02174f (patch) | |
tree | d5a1331c223888514488113dfbb2358229422921 /railties/lib | |
parent | 45786be516e13d55a1fca9a4abaddd5781209103 (diff) | |
parent | d578cbfb5c9fa353ce041bc826e13905910e2d2a (diff) | |
download | rails-7bdc7635b885e473f6a577264fd8efad1c02174f.tar.gz rails-7bdc7635b885e473f6a577264fd8efad1c02174f.tar.bz2 rails-7bdc7635b885e473f6a577264fd8efad1c02174f.zip |
Merge pull request #19404 from dmathieu/remove_rack_env
Don't fallback to RACK_ENV when RAILS_ENV is not present
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/commands/console.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/commands/dbconsole.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/commands/runner.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/commands/server.rb | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/railties/lib/rails.rb b/railties/lib/rails.rb index b1f7c29b5a..5d46bbefe6 100644 --- a/railties/lib/rails.rb +++ b/railties/lib/rails.rb @@ -62,7 +62,7 @@ module Rails # Rails.env.development? # => true # Rails.env.production? # => false def env - @_env ||= ActiveSupport::StringInquirer.new(ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "development") + @_env ||= ActiveSupport::StringInquirer.new(ENV["RAILS_ENV"] || "development") end # Sets the Rails environment. 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") |