From 66e48599b0d98d059862e2eeb64935b0abebc9d0 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 9 Aug 2010 16:14:38 -0700 Subject: FAQ: update Rails requires for Ruby 1.9.2 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. --- FAQ | 6 +++--- 1 file 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 -- cgit v1.2.3-24-ge0c7