diff options
author | kennyj <kennyj@gmail.com> | 2012-12-06 02:05:33 +0900 |
---|---|---|
committer | kennyj <kennyj@gmail.com> | 2012-12-06 02:05:33 +0900 |
commit | a7695579a5979245f7d5e683a67bbfc096f3099a (patch) | |
tree | 07955176072c0881e71dfc782fbb3d730560a262 /railties/lib | |
parent | 396c0681acab95a58f0583d722f488b5b01398d8 (diff) | |
download | rails-a7695579a5979245f7d5e683a67bbfc096f3099a.tar.gz rails-a7695579a5979245f7d5e683a67bbfc096f3099a.tar.bz2 rails-a7695579a5979245f7d5e683a67bbfc096f3099a.zip |
Add ENV['RACK_ENV'] support to rake runner/console/server.
Diffstat (limited to 'railties/lib')
-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"), |