繁体   English   中英

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

[英]Chrome LiveReload extension / guard-livereload disconnecting browser

将Guard-livereload连接到浏览器时出现问题。 每当我尝试启用LiveReload插件时,它都会连接到浏览器并自动断开连接。 LiveReload然后显示以下内容:

http://img21.imageshack.us/img21/2265/bugqf.png

我的Guardfile:

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

控制台输出:

PS D:\workspace\xampp\htdocs\lab\test-menu> guard
04:22:12 - INFO - Guard uses TerminalTitle to send notifications.
04:22:12 - INFO - Guard is now watching at 'D:/workspace/xampp/htdocs/lab/test-menu'
04:22:12 - INFO - LiveReload 1.6 is waiting for a browser to connect.
[Listen warning]:
  Missing dependency 'wdm' (version '~> 0.1')!
  Please run the following to satisfy the dependency:
    gem install --version '~> 0.1' wdm

  For a better performance, it's recommended that you satisfy the missing dependency.
  Listen will be polling changes. Learn more at https://github.com/guard/listen#polling-fallback.

[1] guard(main)> 04:22:17 - INFO - Browser connected.
04:22:18 - INFO - Browser disconnected.
04:22:21 - INFO - Browser connected.
04:22:22 - INFO - Browser disconnected.
04:22:24 - INFO - Browser connected.
04:22:25 - INFO - Browser disconnected.

版本:

  • 后卫:1.7.0
  • livereload:2.0.9
  • 铬:26.0.1410.64 m
  • 窗户:8

对不起,我的英语不好。 谢谢,亚当。

一旦您已经使用了Guard和livereload,就可以使用rack-livereload gem替代插件。 它可能看起来有些难以配置,但是如果您按照其Github页面中的说明进行操作,则将立即进行Livereloading。

它可在以下网址获得: https : //github.com/johnbintz/rack-livereload

从Chromium切换到Chrome并通过执行此操作后,我遇到了同样的问题

gem install guard guard-livereload

不知道问题出在哪里-我也有一些像您这样的依赖警告,并且它们仍在出现

WARN: Unresolved specs during Gem::Specification.reset:
      thor (>= 0.14.6)
      ffi (>= 0.5.0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.

但是无论如何,现在浏览器可以连接而无需立即断开连接。

注意:我正在通过RVM使用Ruby设置。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM