aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/commands/server.rb
diff options
context:
space:
mode:
authorCarl Lerche <carllerche@mac.com>2009-10-16 12:49:39 -0700
committerCarl Lerche <carllerche@mac.com>2009-10-16 12:51:02 -0700
commit2110a524a4913815d036786aa01319fd67db0ee2 (patch)
treef87858a81ac61642827c0617cad9eeceb44e8707 /railties/lib/rails/commands/server.rb
parent6094e6516951444f8c3d6bb31f171af9fe96a02f (diff)
downloadrails-2110a524a4913815d036786aa01319fd67db0ee2.tar.gz
rails-2110a524a4913815d036786aa01319fd67db0ee2.tar.bz2
rails-2110a524a4913815d036786aa01319fd67db0ee2.zip
Deprecate RAILS_ROOT in favor of Rails.root (which proxies to the application's object root)
Diffstat (limited to 'railties/lib/rails/commands/server.rb')
-rw-r--r--railties/lib/rails/commands/server.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/commands/server.rb b/railties/lib/rails/commands/server.rb
index c138cbc9bf..d29fa620fb 100644
--- a/railties/lib/rails/commands/server.rb
+++ b/railties/lib/rails/commands/server.rb
@@ -7,7 +7,7 @@ options = {
:Port => 3000,
:Host => "0.0.0.0",
:environment => (ENV['RAILS_ENV'] || "development").dup,
- :config => RAILS_ROOT + "/config.ru",
+ :config => Rails.root + "/config.ru",
:detach => false,
:debugger => false
}
@@ -46,7 +46,7 @@ puts "=> Rails #{Rails.version} application starting on http://#{options[:Host]}
if options[:detach]
Process.daemon
- pid = "#{RAILS_ROOT}/tmp/pids/server.pid"
+ pid = "#{Rails.root}/tmp/pids/server.pid"
File.open(pid, 'w'){ |f| f.write(Process.pid) }
at_exit { File.delete(pid) if File.exist?(pid) }
end