Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
thenrio opened this issue Feb 22, 2011 · 1 comment
Closed

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

thenrio opened this issue Feb 22, 2011 · 1 comment

Comments

@thenrio
Copy link

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

story

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) ?

@thibaudgg
Copy link
Member

Ok fixed that by using gem which command.

59f555e

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants