From 2690b007f8d4009d11315f4e2b58763b3f0ba003 Mon Sep 17 00:00:00 2001 From: Ranmocy Date: Sun, 20 Jan 2013 08:05:59 +0800 Subject: [PATCH] fix pid_file cannot monitored issue --- lib/guard/rails/runner.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/guard/rails/runner.rb b/lib/guard/rails/runner.rb index 0a7daf1..57c3d03 100644 --- a/lib/guard/rails/runner.rb +++ b/lib/guard/rails/runner.rb @@ -35,7 +35,7 @@ module Guard rails_options = [ '-e', options[:environment], '-p', options[:port], - '--pid', options[:pid_file] || pid_file, + '--pid', pid_file, options[:daemon] ? '-d' : '', options[:debugger] ? '-u' : '', options[:server].nil? ? '' : options[:server], @@ -47,7 +47,7 @@ module Guard end def pid_file - File.expand_path("tmp/pids/#{options[:environment]}.pid") + File.expand_path(options[:pid_file] || "tmp/pids/#{options[:environment]}.pid") end def pid