正在运行
$bundle exec guard
与
ruby 1.9.3p327 (2012-11-10) [i386-mingw32]
Rails 3.2.11
Guard version 1.6.1
对于我来说,在Windows 7 64bit上失败:
17:49:03 - INFO - Guard uses Notifu to send notifications.
17:49:03 - INFO - Guard uses TerminalTitle to send notifications.
C:/Ruby193/lib/ruby/gems/1.9.1/gems/pry-0.9.11.3-x86-mingw32/lib/pry/command_set
.rb:216:in `alias_command': Command: `help` not found (RuntimeError)
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-1.6.1/lib/guard/interacto
r.rb:135:in `block in create_command_aliases'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-1.6.1/lib/guard/interacto
r.rb:134:in `each'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-1.6.1/lib/guard/interacto
r.rb:134:in `create_command_aliases'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-1.6.1/lib/guard/interacto
r.rb:95:in `initialize'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-1.6.1/lib/guard.rb:161:in
`new'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-1.6.1/lib/guard.rb:161:in
`setup_interactor'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-1.6.1/lib/guard.rb:82:in
`setup'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-1.6.1/lib/guard.rb:183:in
`start'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-1.6.1/lib/guard/cli.rb:11
0:in `start'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor/task.rb:27
:in `run'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor/invocation
.rb:120:in `invoke_task'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor.rb:275:in
`dispatch'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor/base.rb:42
5:in `start'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-1.6.1/bin/guard:6:in `<to
p (required)>'
from C:/Ruby193/bin/guard:23:in `load'
from C:/Ruby193/bin/guard:23:in `<main>'
我是否需要以特定方式启动notifu?我错过了什么?
答案 0 :(得分:2)
RKing已filed an issue at Guard并将您的问题与其相关联。看起来这是最新的Pry或者Guard没有使用Pry API的问题。
解决这个问题需要考虑两件事:
禁用交互器
由于Pry仅在交互器中使用,因此您可以在启动Guard时对其进行调整,并且您应该至少使用Guard插件:
$ bundle exec guard -i
找到最后一个正在使用的Pry版本
我认为你应该使用旧版本的Pry运行它,问题是哪个版本引入了不兼容性。您可以通过在Gemfile
中指定版本并运行bundler:
在Gemfile
:
gem 'pry', '0.9.11.2'
然后在控制台中运行bundler:
$ bundle update
如果仍然无效,请使用较低版本。请尝试0.9.11.2
,0.9.11.1
,0.9.11
和0.9.10
。
如果您找到了正常工作的版本,请将其报告给GitHub上链接的Guard问题。