diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-12-05 09:19:32 -0800 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-12-05 09:19:32 -0800 |
commit | ddd4fac8cc1dc3cbffdd4ef71fd260b601a17695 (patch) | |
tree | 07955176072c0881e71dfc782fbb3d730560a262 /railties/lib/rails/commands | |
parent | 396c0681acab95a58f0583d722f488b5b01398d8 (diff) | |
parent | a7695579a5979245f7d5e683a67bbfc096f3099a (diff) | |
download | rails-ddd4fac8cc1dc3cbffdd4ef71fd260b601a17695.tar.gz rails-ddd4fac8cc1dc3cbffdd4ef71fd260b601a17695.tar.bz2 rails-ddd4fac8cc1dc3cbffdd4ef71fd260b601a17695.zip |
Merge pull request #8427 from kennyj/support_rack_env
Add ENV['RACK_ENV'] support to rake runner/console/server.
Diffstat (limited to 'railties/lib/rails/commands')
-rw-r--r-- | railties/lib/rails/commands/console.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/commands/runner.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/commands/server.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/railties/lib/rails/commands/console.rb b/railties/lib/rails/commands/console.rb index 92cee6b638..aef7600fbd 100644 --- a/railties/lib/rails/commands/console.rb +++ b/railties/lib/rails/commands/console.rb @@ -45,7 +45,7 @@ module Rails end def environment - options[:environment] ||= ENV['RAILS_ENV'] || 'development' + options[:environment] ||= ENV['RAILS_ENV'] || ENV['RACK_ENV'] || 'development' end def environment? diff --git a/railties/lib/rails/commands/runner.rb b/railties/lib/rails/commands/runner.rb index 62d82cc005..6adbdc6e0b 100644 --- a/railties/lib/rails/commands/runner.rb +++ b/railties/lib/rails/commands/runner.rb @@ -1,7 +1,7 @@ require 'optparse' require 'rbconfig' -options = { environment: (ENV['RAILS_ENV'] || "development").dup } +options = { environment: (ENV['RAILS_ENV'] || ENV['RACK_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 0b897d736d..cdb29a8156 100644 --- a/railties/lib/rails/commands/server.rb +++ b/railties/lib/rails/commands/server.rb @@ -108,7 +108,7 @@ module Rails super.merge({ Port: 3000, DoNotReverseLookup: true, - environment: (ENV['RAILS_ENV'] || "development").dup, + environment: (ENV['RAILS_ENV'] || ENV['RACK_ENV'] || "development").dup, daemonize: false, debugger: false, pid: File.expand_path("tmp/pids/server.pid"), |