diff options
-rwxr-xr-x | bin/unicorn | 5 |
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) |