summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-06-08 19:35:42 +0000
committerEric Wong <normalperson@yhbt.net>2010-06-08 19:35:42 +0000
commit2c6141c8ae54f17cfb3091231dce0dde7212736b (patch)
treea89a54b4b8912e9b0da0f8379f1b155c350c4db0
parent181ee8ca0855ca8f3af7317f2dc54c7ee63524f7 (diff)
Ruby 1.9.2 no longer includes "." in $LOAD_PATH, so we need to
require using an explicit path.  This issue only affected Rails
3 users who chose to run without the default config.ru, as the
config.ru generated by Rails 3 will call File.expand_path
in the same way.
-rwxr-xr-xbin/unicorn_rails4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/unicorn_rails b/bin/unicorn_rails
index ed235ba..219f962 100755
--- a/bin/unicorn_rails
+++ b/bin/unicorn_rails
@@ -132,8 +132,8 @@ def rails_builder(daemonize)
   lambda do ||
     # Load Rails and (possibly) the private version of Rack it bundles.
     begin
-      require 'config/boot'
-      require 'config/environment'
+      require ::File.expand_path('config/boot')
+      require ::File.expand_path('config/environment')
     rescue LoadError => err
       abort "#$0 must be run inside RAILS_ROOT: #{err.inspect}"
     end