3

我在本地使用 Drupal guardlive-reload

当我加载 run 时bundle exec guard,guard 会正确监视我的文件,以便当我将更改保存到 sass 文件时,它会自动重新编译。

唯一不刷新的是浏览器。livereload.js 已加载到页面中,但似乎不会自动刷新。我将 Ubuntu 与 Chromium 和 Firefox 一起使用,由于没有收到错误消息,我都在努力排除故障。

这是我运行时的输出bundle exec guard

13:48:51 - INFO - Guard::Compass is waiting to compile your stylesheets.
13:48:51 - INFO - LiveReload is waiting for a browser to connect.
13:48:51 - INFO - Guard::Compass is waiting to compile your stylesheets.
13:48:51 - INFO - Guard is now watching at '/var/www/websites/sites/all/themes/first_omega_subtheme'

当我更改 sass 文件时,会发生这种情况

unchanged sass/reset.scss
unchanged sass/hacks.scss
overwrite css/styles.css
unchanged sass/reset.scss
unchanged sass/hacks.scss
unchanged sass/styles.scss
13:36:50 - INFO - Reloading browser: css/styles.css

当我刷新浏览器时会发生这种情况

15:12:13 - INFO - Browser disconnected.
15:12:13 - INFO - Browser connected.

并且页面显示了我无法让它自动刷新的更改

4

1 回答 1

0

尝试安装浏览器扩展

 https://github.com/downloads/siasia/livereload-extensions/LiveReload-2.0.9.xpi

并在安装后尝试重新启动所有浏览器并再次连接它会正常工作,否则请阅读 monre

 https://github.com/guard/guard-livereload/issues/88

于 2013-11-08T17:04:06.067 回答