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

Already on GitHub? Sign in to your account

Wrong template path #3

Closed
wereHamster opened this Issue Oct 20, 2010 · 2 comments

Comments

Projects
None yet
2 participants
guard init rspec
Writing new Guardfile to /Users/tomc/devel/oolink/Backend/Guardfile
ERROR: Could not find gem 'guard-rspec' in the current Gemfile.
/Library/Ruby/Gems/1.8/gems/guard-0.1.1/lib/guard/guard.rb:15:in `read': No such file or directory - /lib/guard/rspec/templates/Guardfile (Errno::ENOENT)
from /Library/Ruby/Gems/1.8/gems/guard-0.1.1/lib/guard/guard.rb:15:in `init'
from /Library/Ruby/Gems/1.8/gems/guard-0.1.1/lib/guard/cli.rb:33:in `init'
from /Library/Ruby/Gems/1.8/gems/thor-0.14.3/lib/thor/task.rb:22:in `send'
from /Library/Ruby/Gems/1.8/gems/thor-0.14.3/lib/thor/task.rb:22:in `run'
from /Library/Ruby/Gems/1.8/gems/thor-0.14.3/lib/thor/invocation.rb:118:in `invoke_task'
from /Library/Ruby/Gems/1.8/gems/thor-0.14.3/lib/thor.rb:246:in `dispatch'
from /Library/Ruby/Gems/1.8/gems/thor-0.14.3/lib/thor/base.rb:389:in `start'
from /Library/Ruby/Gems/1.8/gems/guard-0.1.1/bin/guard:6
from /usr/bin/guard:19:in `load'
from /usr/bin/guard:19

but guard-rspec is installed, and the Guardfile is in /Library/Ruby/Gems/1.8/gems/guard-rspec-0.1.3/lib/guard/rspec/templates/Guardfile. It's a rails2 app and there is no Gemfile.

Owner

thibaudgg commented Oct 20, 2010

Yes it's normal. guard init <guard_name> works only with a Gemfile, because Bundler is used to find the gem path of the guard (to find the Guardfile template). (here http://github.com/guard/guard/blob/master/lib/guard.rb inside locate_guard method)

Do you know a better way to find a gem path without using Bundler?

Owner

thibaudgg commented Oct 20, 2010

guard init command no more need Gemfile presence but open_gem is required now
Closed by ec87585.

This issue was closed.

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