diff options
author | Carlhuda <carlhuda@Carlhudas-iMac.local> | 2009-11-23 17:05:13 -0800 |
---|---|---|
committer | Carlhuda <carlhuda@Carlhudas-iMac.local> | 2009-11-23 17:28:50 -0800 |
commit | 58dec093536e63e61a9d69341da539048367f5e1 (patch) | |
tree | 50e1dfdbcfc3ee31bb5593349d7b9069ccf994b1 /railties | |
parent | c102db9367690af992786d2a62bbf8caeec88742 (diff) | |
download | rails-58dec093536e63e61a9d69341da539048367f5e1.tar.gz rails-58dec093536e63e61a9d69341da539048367f5e1.tar.bz2 rails-58dec093536e63e61a9d69341da539048367f5e1.zip |
Update rails application root detection to take into consideration a callstack that includes the rack library
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/configuration.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/configuration.rb b/railties/lib/rails/configuration.rb index 102a0836dc..3f43a48e2e 100644 --- a/railties/lib/rails/configuration.rb +++ b/railties/lib/rails/configuration.rb @@ -31,7 +31,7 @@ module Rails def root @root ||= begin call_stack = caller.map { |p| p.split(':').first } - root_path = call_stack.detect { |p| p !~ %r[railties/lib/rails] } + root_path = call_stack.detect { |p| p !~ %r[railties/lib/rails|rack/lib/rack] } root_path = File.dirname(root_path) while root_path && File.directory?(root_path) && !File.exist?("#{root_path}/config.ru") |