aboutsummaryrefslogtreecommitdiffstats
path: root/railties/environments/boot.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/environments/boot.rb')
-rw-r--r--railties/environments/boot.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/railties/environments/boot.rb b/railties/environments/boot.rb
index bc075ed09b..9e35fb6c15 100644
--- a/railties/environments/boot.rb
+++ b/railties/environments/boot.rb
@@ -1,5 +1,8 @@
+unless defined?(RAILS_ROOT)
require 'pathname'
-RAILS_ROOT = Pathname.new(File.join(File.dirname(__FILE__), '..')).cleanpath.to_s + '/' unless defined?(RAILS_ROOT)
+ root_path = Pathname.new(File.join(File.dirname(__FILE__), '..'))
+ RAILS_ROOT = root_path.cleanpath.to_s + '/'
+end
if File.directory?("#{RAILS_ROOT}/vendor/rails")
require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"