当我试图用

guard --debug

发生以下错误。

For a better Pry experience on Windows, please use ansicon:
   http://adoxa.3eeweb.com/ansicon/
DL is deprecated, please use Fiddle
21:14:45 - INFO - You must 'gem install win32console' to use color on Windows
21:14:45 - ERROR - Could not load 'guard/livereload' or find class Guard::Livere
load
21:14:45 - ERROR - C:/RailsInstaller/Ruby2.0.0/lib/ruby/site_ruby/2.0.0/rubygems
/core_ext/kernel_require.rb:126:in `require'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/ker
nel_require.rb:126:in `require'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/http_parser.rb-0.5.3-
x86-mingw32/lib/ruby_http_parser.rb:2:in `<top (required)>'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/ker
nel_require.rb:135:in `require'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/ker
nel_require.rb:135:in `rescue in require'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/ker
nel_require.rb:144:in `require'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/http_parser.rb-0.5.3-
x86-mingw32/lib/http_parser.rb:2:in `<top (required)>'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/ker
nel_require.rb:135:in `require'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/ker
nel_require.rb:135:in `rescue in require'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/ker
nel_require.rb:144:in `require'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/http_parser.rb-0.5.3-
x86-mingw32/lib/http/parser.rb:1:in `<top (required)>'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/ker
nel_require.rb:73:in `require'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/ker
nel_require.rb:73:in `require'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/em-websocket-0.5.0/li
b/em-websocket/handshake.rb:1:in `<top (required)>'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/ker
nel_require.rb:73:in `require'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/ker
nel_require.rb:73:in `require'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/em-websocket-0.5.0/li
b/em-websocket.rb:15:in `block in <top (required)>'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/em-websocket-0.5.0/li
b/em-websocket.rb:14:in `each'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/em-websocket-0.5.0/li
b/em-websocket.rb:14:in `<top (required)>'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/ker
nel_require.rb:73:in `require'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/ker
nel_require.rb:73:in `require'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/guard-livereload-2.1.
2/lib/guard/livereload/websocket.rb:2:in `<top (required)>'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/ker
nel_require.rb:73:in `require'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/ker
nel_require.rb:73:in `require'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/guard-livereload-2.1.
2/lib/guard/livereload.rb:6:in `<class:LiveReload>'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/guard-livereload-2.1.
2/lib/guard/livereload.rb:5:in `<module:Guard>'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/guard-livereload-2.1.
2/lib/guard/livereload.rb:4:in `<top (required)>'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/ker
nel_require.rb:135:in `require'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/ker
nel_require.rb:135:in `rescue in require'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/ker
nel_require.rb:144:in `require'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/guard-2.6.0/lib/guard
/plugin_util.rb:100:in `plugin_class'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/guard-2.6.0/lib/guard
/plugin_util.rb:57:in `initialize_plugin'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/guard-2.6.0/lib/guard
.rb:167:in `add_plugin'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/guard-2.6.0/lib/guard
/dsl.rb:174:in `block in guard'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/guard-2.6.0/lib/guard
/dsl.rb:173:in `each'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/guard-2.6.0/lib/guard
/dsl.rb:173:in `guard'
> [#] C:/Users/ZAW OO/Desktop/work/Guardfile:39:in `_instance_eval_guardfile'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/guard-2.6.0/lib/guard
/guardfile/evaluator.rb:97:in `instance_eval'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/guard-2.6.0/lib/guard
/guardfile/evaluator.rb:97:in `_instance_eval_guardfile'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/guard-2.6.0/lib/guard
/guardfile/evaluator.rb:37:in `evaluate_guardfile'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/guard-2.6.0/lib/guard
/setuper.rb:146:in `evaluate_guardfile'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/guard-2.6.0/lib/guard
/setuper.rb:64:in `setup'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/guard-2.6.0/lib/guard
/commander.rb:24:in `start'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/guard-2.6.0/lib/guard
/cli.rb:107:in `start'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/
command.rb:27:in `run'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/
invocation.rb:126:in `invoke_command'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor.
rb:359:in `dispatch'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/
base.rb:440:in `start'
> [#] C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/guard-2.6.0/bin/guard
:6:in `<top (required)>'
> [#] C:/RailsInstaller/Ruby2.0.0/bin/guard:23:in `load'
> [#] C:/RailsInstaller/Ruby2.0.0/bin/guard:23:in `<main>'
21:14:45 - ERROR - Invalid Guardfile, original error is:
> [#] undefined method `superclass' for nil:NilClass
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/guard-2.6.0/lib/guard/plugi
n_util.rb:57:in `initialize_plugin': undefined method `superclass' for nil:NilCl
ass (NoMethodError)
        from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/guard-2.6.0/li
b/guard.rb:167:in `add_plugin'
        from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/guard-2.6.0/li
b/guard/dsl.rb:174:in `block in guard'
        from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/guard-2.6.0/li
b/guard/dsl.rb:173:in `each'
        from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/guard-2.6.0/li
b/guard/dsl.rb:173:in `guard'
        from C:/Users/ZAW OO/Desktop/work/Guardfile:39:in `_instance_eval_guardf
ile'
        from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/guard-2.6.0/li
b/guard/guardfile/evaluator.rb:97:in `instance_eval'
        from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/guard-2.6.0/li
b/guard/guardfile/evaluator.rb:97:in `_instance_eval_guardfile'
        from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/guard-2.6.0/li
b/guard/guardfile/evaluator.rb:37:in `evaluate_guardfile'
        from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/guard-2.6.0/li
b/guard/setuper.rb:146:in `evaluate_guardfile'
        from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/guard-2.6.0/li
b/guard/setuper.rb:64:in `setup'
        from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/guard-2.6.0/li
b/guard/commander.rb:24:in `start'
        from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/guard-2.6.0/li
b/guard/cli.rb:107:in `start'
        from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/thor-0.19.1/li
b/thor/command.rb:27:in `run'
        from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/thor-0.19.1/li
b/thor/invocation.rb:126:in `invoke_command'
        from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/thor-0.19.1/li
b/thor.rb:359:in `dispatch'
        from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/thor-0.19.1/li
b/thor/base.rb:440:in `start'
        from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/guard-2.6.0/bi
n/guard:6:in `<top (required)>'
        from C:/RailsInstaller/Ruby2.0.0/bin/guard:23:in `load'
        from C:/RailsInstaller/Ruby2.0.0/bin/guard:23:in `<main>'

这是我的警卫档案

# A sample Guardfile
# More info at https://github.com/guard/guard#readme

guard 'sass', :input => 'sass', :output => 'css'

guard 'livereload' do
    watch(%r{.+\.(css|html|js)$})
end 

但是,当我在Guardfile中将livereload部分留空时,它会正常工作。 我也尝试安装Win32console,但是不存在软件包,后来我发现它不需要ruby2。我在ruby 2.0.0p195(2013-05-14)[i386-mingw32]下在64bit上运行防护(Window 7)。

  ask by Naing Lin Aung translate from so

本文未有回复,本站智能推荐:

1回复

guard-livereload无法重新加载浏览器

我正在使用guard-livereload gem来监视PHP项目中的更改。 这是描述我的警卫配置的要点 : 当我运行guard它的工作原理相同,但浏览器不会重新加载页面。 有任何想法吗?
1回复

如何使用ruby guard忽略目录进行livereload?

我使用Xcode作为开发IDE来编辑我正在从事的项目的某些网页和CSS。 为了启用实时重载功能,我正在使用配置了“ livereload”插件的ruby“ guard”程序,它的运行效果很好。 但是,Xcode似乎将当前正在编辑的文件保存到与原始文件位于同一目录中的名为“(Xcode保存
1回复

初始化guard-livereload时出错

我正在尝试在Windows上安装后卫重新加载。 到目前为止,我已经安装了防护装置并通过捆绑机工作。 但是在安装livereload gem并尝试使用guard init livereload和bundler exec guard init livereload我得到以下内容: 10:12
1回复

Windows上的guard-livereload

我在Windows上的guard-livereload配置: RubyInstaller 1.9.3-p429 的devkit-TDM-32-4.5.2-20111229-1559 宝石安装:guard guard-livereload wdm Firefox
2回复

Chrome LiveReload扩展程序/ Guard-livereload断开浏览器

将Guard-livereload连接到浏览器时出现问题。 每当我尝试启用LiveReload插件时,它都会连接到浏览器并自动断开连接。 LiveReload然后显示以下内容: http://img21.imageshack.us/img21/2265/bugqf.png 我的G
2回复

守卫负载停止工作

自从今天早上合并了我的同事的更改以来, guard-livereload工作已停止工作。 javascript被注入到页面中,guard确实检测到了我的浏览器,但是无论我修改了什么文件,它都不会重新加载。 这是我今天的控制台输出, livereload无法正常工作。 请注意,检测到浏览
1回复

为什么Guard Livereload无法启动服务器?

我在新的Rails项目中设置了Guard和Guar-Livereload,与上一个项目中的设置类似:Gemfile: 在我的Guardfile中: 它是在发出命令guard init guard-livereload之后创建的。 当我签发guard我会看到以下消息: 但
2回复

在Rails中使用Guard :: LiveReload

嗨,我正在尝试设置Guard :: LiveReload,并对其工作方式感到非常困惑。 我已经安装了Guard,Livereload等,并按照此处的说明进行操作: https : //github.com/guard/guard-livereload ,并相应地更新了我的Gemfile和Gua
1回复

保护非铁路的livereload

我目前有一个要使用Guard-livereload的基于PHP / MySQL的站点。 但是, 自述文件中的所有指示符似乎都说它仅保留给基于Rails(或更具体地说是Rack)的站点。 这是真的? 有什么方法可以在这个基于LAMP的站点中开始使用Guard-livereload? P
2回复

LiveReload与Guard不工作,即使它说它确实如此

我正在尝试在Windows 7上使用Guard和LiveReload插件进行Chrome浏览器。它无法正常工作,我不知道如何解决这个问题。 我正在使用Bash启动防护,然后在浏览器中激活LiveReload。 这是它告诉我的: 所以,它说它正在重新加载浏览器。 但什么都没发生。