about summary refs log tree commit homepage
path: root/FAQ
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-08-09 16:14:38 -0700
committerEric Wong <normalperson@yhbt.net>2010-08-09 16:17:25 -0700
commit66e48599b0d98d059862e2eeb64935b0abebc9d0 (patch)
tree8be38c64573cd977fcfc320d287a42a806c38325 /FAQ
parent62b72b1471705a4ac3aa9ee671f9022bdb556842 (diff)
downloadrainbows-66e48599b0d98d059862e2eeb64935b0abebc9d0.tar.gz
Ruby 1.9.2 no longer includes '.' inside $LOAD_PATH by default,
so those requires won't work unless we specify the full path.
We prefer File.expand_path to prefixing './' since we want to be
consistent with what Rails itself uses to prevent
double-requires.
Diffstat (limited to 'FAQ')
-rw-r--r--FAQ6
1 files changed, 3 insertions, 3 deletions
diff --git a/FAQ b/FAQ
index ffe03a6..7dd191d 100644
--- a/FAQ
+++ b/FAQ
@@ -77,15 +77,15 @@ to set RAILS_ENV.
 For Rails 2.3.x, the following config.ru will work for you:
 
   ENV["RAILS_ENV"] ||= ENV["RACK_ENV"]
-  require "config/environment"
+  require "#{::File.expand_path('config/environment')}"
   use Rails::Rack::Static
   run ActionController::Dispatcher.new
 
 For older versions of Rails, the following config.ru will work:
 
   ENV["RAILS_ENV"] ||= ENV["RACK_ENV"]
-  require 'config/boot'
-  require 'config/environment'
+  require "#{::File.expand_path('config/boot')}"
+  require "#{::File.expand_path('config/environment')}"
   require 'unicorn/app/old_rails'
   require 'unicorn/app/old_rails/static' # not needed with Unicorn 0.95+
   use Unicorn::App::OldRails::Static