about summary refs log tree commit homepage
path: root/bin
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-03-03 11:53:03 -0800
committerEric Wong <normalperson@yhbt.net>2009-03-03 11:55:47 -0800
commit0632255f337d6978624a52e3197a79988b31aab0 (patch)
tree070a18163baf2d80aeb721ddf537f39fb9a5ae2a /bin
parent11172f9bdcc7c57c9ae857a8088e49527a953fa1 (diff)
downloadunicorn-0632255f337d6978624a52e3197a79988b31aab0.tar.gz
This allows LOAD_PATH modifications via the command-line
(via -I or -rubygems on the command-line).
Diffstat (limited to 'bin')
-rwxr-xr-xbin/unicorn5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/unicorn b/bin/unicorn
index 18edf43..de93985 100755
--- a/bin/unicorn
+++ b/bin/unicorn
@@ -1,7 +1,6 @@
 #!/home/ew/bin/ruby
 $stdin.sync = $stdout.sync = $stderr.sync = true
 require 'unicorn' # require this first to populate Unicorn::DEFAULT_START_CTX
-require 'rack'
 require 'optparse'
 
 env = "development"
@@ -102,6 +101,10 @@ end
 
 require 'pp' if $DEBUG
 
+# require Rack as late as possible in case $LOAD_PATH is modified
+# in config.ru or command-line
+require 'rack'
+
 config = ARGV[0] || "config.ru"
 abort "configuration file #{config} not found" unless File.exist?(config)