From 2632664f6459b387f64ba473712af049e543beb4 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sun, 18 Mar 2007 13:35:16 +0000 Subject: Deprecation: remove components from controller paths. Canonicalize RAILS_ROOT by using File.expand_path on Windows, which doesn't have to worry about symlinks, and Pathname#realpath elsewhere, which respects symlinks in relative paths but is incompatible with Windows. Closes #6755. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6445 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/environments/boot.rb | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'railties/environments') diff --git a/railties/environments/boot.rb b/railties/environments/boot.rb index b7af0c35c7..901deb666d 100644 --- a/railties/environments/boot.rb +++ b/railties/environments/boot.rb @@ -1,15 +1,6 @@ # Don't change this file. Configuration is done in config/environment.rb and config/environments/*.rb -unless defined?(RAILS_ROOT) - root_path = File.join(File.dirname(__FILE__), '..') - - unless RUBY_PLATFORM =~ /(:?mswin|mingw)/ - require 'pathname' - root_path = Pathname.new(root_path).cleanpath(true).to_s - end - - RAILS_ROOT = root_path -end +RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT) unless defined?(Rails::Initializer) if File.directory?("#{RAILS_ROOT}/vendor/rails") -- cgit v1.2.3