guard init work in presence of gem-open and open_gem gems #35

thenrio opened this Issue Feb 22, 2011 · 1 comment


None yet

2 participants

thenrio commented Feb 22, 2011

guard init command can be confused in presence of gem-open gem

at least, on my mri-1.9.2-p136, it is consistently confused


Given I have gem installed "guard-rspec"
  And I have gem installed "gem-open"
When I run command "guard init rspec"
Then I should see "feel free to edit it"

Actually, I see a stack

~/src/ruby/dojo $ gem install gem-open
Fetching: gem-open-0.1.3.gem (100%)
Successfully installed gem-open-0.1.3
1 gem installed
Installing RDoc documentation for gem-open-0.1.3...
~/src/ruby/dojo $ guard init rspec
Writing new Guardfile to /Users/thenrio/src/ruby/dojo/Guardfile
ERROR:  While executing gem ... (OptionParser::InvalidOption)
    invalid option: --latest
/Users/thenrio/.rvm/gems/ruby-1.9.2-p136/gems/guard-0.3.0/lib/guard/guard.rb:15:in `read': No such file or directory - /lib/guard/rspec/templates/Guardfile (Errno::ENOENT)
    from /Users/thenrio/.rvm/gems/ruby-1.9.2-p136/gems/guard-0.3.0/lib/guard/guard.rb:15:in `init'
    from /Users/thenrio/.rvm/gems/ruby-1.9.2-p136/gems/guard-0.3.0/lib/guard/cli.rb:35:in `init'
    from /Users/thenrio/.rvm/gems/ruby-1.9.2-p136/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
    from /Users/thenrio/.rvm/gems/ruby-1.9.2-p136/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
    from /Users/thenrio/.rvm/gems/ruby-1.9.2-p136/gems/thor-0.14.6/lib/thor.rb:263:in `dispatch'
    from /Users/thenrio/.rvm/gems/ruby-1.9.2-p136/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
    from /Users/thenrio/.rvm/gems/ruby-1.9.2-p136/gems/guard-0.3.0/bin/guard:6:in `<top (required)>'
    from /Users/thenrio/.rvm/gems/ruby-1.9.2-p136/bin/guard:19:in `load'
    from /Users/thenrio/.rvm/gems/ruby-1.9.2-p136/bin/guard:19:in `<main>'

options for resolution

It might be difficult to know what gem is providing the open command for gem ...

When both 'gem-open' and 'open_gem' are installed then 'gem-open' is winning on my computer, still both claim to provide the open command...

Couldn't gem api directly be used, rather than relying on a third gem (gem-open or open_gem) ?


Ok fixed that by using gem which command.


Thanks for your feedback!

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