about summary refs log tree commit homepage
path: root/bin
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-11-04 15:40:21 -0800
committerEric Wong <normalperson@yhbt.net>2009-11-04 15:40:21 -0800
commitb7041284279371ffe16de31880c19d48f6a624bb (patch)
tree241ae6975948eaec562be3b9ffb85cfb705a09e3 /bin
parent9c08e67562db122a4c9958d9343eae29690c16e0 (diff)
downloadrainbows-b7041284279371ffe16de31880c19d48f6a624bb.tar.gz
Merb, Sinatra, Thin, Passenger and now even Unicorn will it, so
we set and use it too because that's what all the cool kids are
doing.
Diffstat (limited to 'bin')
-rw-r--r--bin/rainbows6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/rainbows b/bin/rainbows
index b3f3a26..eec54b0 100644
--- a/bin/rainbows
+++ b/bin/rainbows
@@ -4,7 +4,7 @@ require 'unicorn/launcher'
 require 'rainbows'
 require 'optparse'
 
-env = "development"
+ENV["RACK_ENV"] = "development"
 daemonize = false
 listeners = []
 options = { :listeners => listeners }
@@ -59,7 +59,7 @@ opts = OptionParser.new("", 24, '  ') do |opts|
 
   opts.on("-E", "--env ENVIRONMENT",
           "use ENVIRONMENT for defaults (default: development)") do |e|
-    env = e
+    ENV["RACK_ENV"] = e
   end
 
   opts.on("-D", "--daemonize", "run daemonized in the background") do |d|
@@ -134,7 +134,7 @@ app = lambda do ||
     Object.const_get(File.basename(config, '.rb').capitalize)
   end
   pp({ :inner_app => inner_app }) if $DEBUG
-  case env
+  case ENV["RACK_ENV"]
   when "development"
     Rack::Builder.new do
       use Rack::CommonLogger, $stderr