diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/initializer.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb index ea61d4e4fe..09a98d5aa3 100644 --- a/railties/lib/initializer.rb +++ b/railties/lib/initializer.rb @@ -28,7 +28,11 @@ module Rails end def root - RAILS_ROOT + if defined?(RAILS_ROOT) + RAILS_ROOT + else + nil + end end def env @@ -40,7 +44,7 @@ module Rails end def public_path - @@public_path ||= File.join(self.root, "public") + @@public_path ||= self.root ? File.join(self.root, "public") : "public" end def public_path=(path) |