guard-livereload不重新加载浏览器

时间:2014-06-18 16:43:38

标签: php ruby guard livereload

我正在使用guard-livereload gem来监控PHP项目中的更改。这是一个gist来描述我的后卫配置:

#setup the Gemfile
$ nano Gemfile
source 'https://rubygems.org'
group :development do
  gem 'guard'
  gem 'guard-livereload', require: false
end

$ bundle

#config the Guardfile
$ nano Guardfile
guard :livereload do
  watch(%r{.+\.(css|js|html|php|tpl)$})
end

当我运行guard时,它的工作方式相同,但浏览器不会重新加载页面。

$ bundle exec guard
18:37:36 - INFO - Guard is using NotifySend to send notifications.
18:37:36 - INFO - Guard is using TerminalTitle to send notifications.
18:37:36 - INFO - LiveReload is waiting for a browser to connect.
18:37:36 - INFO - Guard is now watching at '/var/www/html/se/se/application/modules/Tmp'
[1] guard(main)> 18:37:43 - INFO - Browser connected.
18:37:54 - INFO - Reloading browser: views/scripts/tmp/index.tpl
18:38:02 - INFO - Reloading browser: views/scripts/tmp/index.tpl
18:38:12 - INFO - Reloading browser: views/scripts/tmp/index.tpl
18:38:23 - INFO - Reloading browser: views/scripts/tmp/index.tpl
[1] guard(main)> 

有什么想法吗?

1 个答案:

答案 0 :(得分:2)

重新加载似乎被正确触发,您的问题可能在浏览器端。你需要

Live Reload Icon