diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-08-09 16:14:38 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-08-09 16:17:25 -0700 |
commit | 66e48599b0d98d059862e2eeb64935b0abebc9d0 (patch) | |
tree | 8be38c64573cd977fcfc320d287a42a806c38325 | |
parent | 62b72b1471705a4ac3aa9ee671f9022bdb556842 (diff) | |
download | rainbows-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.
-rw-r--r-- | FAQ | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |