1

Since merging in my co-worker's changes this morning, guard-livereload has stopped working. The javascript is being injected into the page, and guard does detect my browser, but no matter what files I modify, it simply does not reload whatsoever.

Here is my console output today, with livereload not working. Note that there is just zero output after detecting the browser - unlike other questions on stackoverflow, where livereload claims to be reloading but does not do anything. Here is my console output from the last time I was at work, when it did function correctly. The annoying thing is that ui.css.scss is the file I'm modifying now as well! My guardfile has not changed, I've checked.

Here is my bundle install output from this morning (my co-worker updated a bunch of gems). I'm using rack-livereload in lieu of a browser extension.

Any advice?

UPDATE: I've tried using the Livereload Chrome extension, but I get exactly the same (lack of) output, so I don't believe rack-livereload to be the culprit.

henrebotha
  • 1,244
  • 2
  • 14
  • 36

2 Answers2

1

Found the solution, in part thanks to this.

It turns out Sublime Text 3's atomic save feature is what was preventing LiveReload from detecting changes to Sass files. Why it worked before a certain commit is beyond me...

Simply add "atomic_save": false to your Sublime settings to avert this.

Community
  • 1
  • 1
henrebotha
  • 1,244
  • 2
  • 14
  • 36
  • 1
    FYI atomic_save is disabled by default as of build 3080 http://www.sublimetext.com/3 – Luke Jun 05 '15 at 11:06
1

Just to add an alternative solution - for me this was because I'd upgraded to rails 4.2 and changed my asset file names from .css.scss to .scss as per the recommendation in the logs.

Of course, when I checked my Guardfile I was still watching for .css files:

... (css|js|html|png|jpg) ... { |m| "/assets/#{m[3]}" }

A simple change from watching for css to scss like so:

... (scss|js|html|png|jpg) ... { |m| "/assets/#{m[3]}" }

and all fixed!

Luke
  • 1,639
  • 15
  • 16