From bb324693ab8e197b369b90e2c3b46d67395a58e5 Mon Sep 17 00:00:00 2001 From: Ryan Duryea Date: Tue, 4 May 2010 11:49:22 -0700 Subject: Pass rack the absolute path of server's pid file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When running as a daemon, rack will cd to "/" and paths relative to the root of the rails app aren't valid when rack is setting up. Because of this, "rails server -d" was failing silently when trying to write it's pid file Signed-off-by: José Valim --- railties/lib/rails/commands/server.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/lib/rails') diff --git a/railties/lib/rails/commands/server.rb b/railties/lib/rails/commands/server.rb index 3f74cd49fc..861baa297e 100644 --- a/railties/lib/rails/commands/server.rb +++ b/railties/lib/rails/commands/server.rb @@ -83,7 +83,7 @@ module Rails :environment => (ENV['RAILS_ENV'] || "development").dup, :daemonize => false, :debugger => false, - :pid => "tmp/pids/server.pid" + :pid => File.expand_path("tmp/pids/server.pid") }) end end -- cgit v1.2.3