1

跑步

$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吗?我错过了什么?

4

1 回答 1

2

RKing 已向Guard 提交了一个问题,并将您的问题与它相关联。看起来这要么是最新 Pry 的问题,要么是 Guard 没有正确使用 Pry API。

为了解决这个问题,我想到了两件事:

  1. 禁用交互器

    由于 Pry 仅在交互器中使用,您可以在启动 Guard 时禁用它,并且您应该至少让 Guard 插件工作:

    $ bundle exec guard -i

  2. 找到最后一个工作的 Pry 版本

    我认为你应该让它与旧版本的 Pry 一起运行,问题是哪个版本引入了不兼容。Gemfile您可以通过在您的和运行捆绑器中指定版本来使用固定的 Pry 版本:

    在你的Gemfile

    gem 'pry', '0.9.11.2'

    然后在控制台中运行 bundler:

    $ bundle update

    如果还是不行,就用低版本吧。请尝试0.9.11.2,0.9.11.1和.0.9.110.9.10

    如果您找到了工作版本,请将其报告给 GitHub 上链接的 Guard 问题。

于 2013-01-19T15:39:10.737 回答