From 097ce1f17e6f5fd94dbf1d9b45a48931ad4feffb Mon Sep 17 00:00:00 2001 From: brainopia Date: Sat, 16 Apr 2011 23:43:50 +0400 Subject: [PATCH] Fix Guard.locate_guard to return path to gem folder --- lib/guard.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/guard.rb b/lib/guard.rb index 38d90cc..65dd42a 100644 --- a/lib/guard.rb +++ b/lib/guard.rb @@ -91,7 +91,7 @@ module Guard end def locate_guard(name) - `gem which guard/#{name}`.chomp + Gem.source_index.find_name("guard-#{name}").last.full_gem_path rescue UI.error "Could not find 'guard-#{name}' gem path." end