From d0901933c186520a3f7afdd411c5594e46874a83 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Sat, 25 Jun 2011 12:57:07 -0400 Subject: [PATCH] fix a dumb thing and another thing --- lib/guard/rails/runner.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/guard/rails/runner.rb b/lib/guard/rails/runner.rb index 34c10c6..23ac71f 100644 --- a/lib/guard/rails/runner.rb +++ b/lib/guard/rails/runner.rb @@ -22,6 +22,7 @@ module Guard def stop if File.file?(pid_file) system %{kill -KILL #{File.read(pid_file).strip}} + sleep sleep_time end end @@ -75,7 +76,7 @@ module Guard def unmanaged_pid pid_command = "lsof -n -i TCP:#{options[:port]}" - %x{pid_command}.each_line { |line| + %x{#{pid_command}}.each_line { |line| if line["*:#{options[:port]} "] return line.split("\s")[1] end