I have the following setup: rails 4. all SCSS and HTML are in app/assets/stylesheets | templates
Gemfile:
gem 'guard'
gem 'guard-compass'
gem 'guard-shell'
gem 'guard-livereload'
Guardfile:
guard :livereload do
watch(%r{app/assets/.+\.(css|html|png|jpg)})
end
Liverload is connected and waiting for changes
$ guard
19:45:10 - INFO - LiveReload is waiting for a browser to connect.
19:45:11 - INFO - Guard is now watching at '/Users/dev/myproject'
[1] guard(main)> 19:46:05 - INFO - Browser connected.
I'm having the same issue -- I think it's because Guard only watches for CSS changes, but the CSS isn't compiled until a request is made. If you edit your main stylesheet (or any with the .css.scss
extension) should trigger a live-reload although partials won't.
Adding scss
to your guardfile should mean it picks up changes in partials, but it seems to trigger a full page refresh rather than injecting the styles.
I assume this is a misconfiguration on my part or possibly an update to one of the gems has broken something but I'm not sure how to begin tracking that down.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With