Fix "guard init" command #43

merged 1 commit into from Apr 16, 2011


None yet

3 participants


Commit 59f555e introduced a following problem, Gem.locate_guard returns incorrect path.

Before aforementioned commit the method was returning a path to gem folder, eg:

$ gem open guard-minitest --latest --command echo

But after the commit it returns:

$ gem which guard/minitest

And since Guard::Guard.init depends on this method, there is an error when you trying to init specific guard:

$  guard init minitest
Writing new Guardfile to /Users/brainopia/code/rails/ororo/Guardfile
/Users/brainopia/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.3.1/lib/guard/guard.rb:15:in `read': Not a directory - /Users/brainopia/.rvm/gems/ruby-1.9.2-p180/gems/guard-minitest-0.3.0/lib/guard/minitest.rb/lib/guard/minitest/templates/Guardfile (Errno::ENOTDIR)

I've fixed this problem without reintroducing dependency on open_gem with following line of code:

@rymai rymai merged commit 097ce1f into guard:master Apr 16, 2011
Guard member

Hey thanks, that looks great indeed!



Thanks, I was just about to fix this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment