aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/commands/process/spawner.rb6
-rw-r--r--railties/lib/initializer.rb3
2 files changed, 5 insertions, 4 deletions
diff --git a/railties/lib/commands/process/spawner.rb b/railties/lib/commands/process/spawner.rb
index 0a34bd6e4b..8fdfab945a 100644
--- a/railties/lib/commands/process/spawner.rb
+++ b/railties/lib/commands/process/spawner.rb
@@ -114,9 +114,9 @@ end
OPTIONS = {
:environment => "production",
:spawner => '/usr/bin/env spawn-fcgi',
- :dispatcher => File.expand_path(RAILS_ROOT + '/public/dispatch.fcgi'),
- :pids => File.expand_path(RAILS_ROOT + "/tmp/pids"),
- :rails_root => File.expand_path(RAILS_ROOT),
+ :dispatcher => File.expand_path(RELATIVE_RAILS_ROOT + '/public/dispatch.fcgi'),
+ :pids => File.expand_path(RELATIVE_RAILS_ROOT + "/tmp/pids"),
+ :rails_root => File.expand_path(RELATIVE_RAILS_ROOT),
:process => "dispatch",
:port => 8000,
:address => '0.0.0.0',
diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb
index 6b9a5ae2ae..b391be6acc 100644
--- a/railties/lib/initializer.rb
+++ b/railties/lib/initializer.rb
@@ -502,7 +502,8 @@ module Rails
else
Pathname.new(::RAILS_ROOT).realpath.to_s
end
-
+
+ Object.const_set(:RELATIVE_RAILS_ROOT, ::RAILS_ROOT.dup) unless defined?(::RELATIVE_RAILS_ROOT)
::RAILS_ROOT.replace @root_path
end