From 66db0b9440e4db594c951d38f641e1910fd44db3 Mon Sep 17 00:00:00 2001 From: Philip Arndt Date: Thu, 24 May 2012 16:29:08 +1200 Subject: [PATCH] Fixed backward incompatibility for engines. - Many engines rely on being able to join directories to the Rails root: Rails.root.join('somedir') - This was now impossible because Rails.root returned a String: NoMethodError: undefined method `join' for "/code/myrailsapp":String - This was broken in 4001835db00ce44cb75bca33ec02cd76b8ccc790 --- railties/lib/rails/engine.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 619c76206d..4c7199a2e2 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -652,7 +652,7 @@ module Rails root = File.exist?("#{root_path}/#{flag}") ? root_path : default raise "Could not find root path for #{self}" unless root - File.realpath root + Pathname.new File.realpath root end def default_middleware_stack