From 2110a524a4913815d036786aa01319fd67db0ee2 Mon Sep 17 00:00:00 2001 From: Carl Lerche Date: Fri, 16 Oct 2009 12:49:39 -0700 Subject: Deprecate RAILS_ROOT in favor of Rails.root (which proxies to the application's object root) --- railties/lib/rails/commands/server.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'railties/lib/rails/commands/server.rb') 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 -- cgit v1.2.3