I have a linux desktop locally and my entire dev enviornment is on rackspace cloud server. So i need to reload a site on remote server. I am using BOA stack from omega8.cc . I have spent last full 2 days trying to make live reload working but all in vain. I have tried browser extension, grund-reload, grunt-contrib-connect and connect-livereload as middleware etc but nothing works. Grunt compiling and watch works but the browser doesn't reload or refresh. I am aslo not able to see any livereload related script tag in the html.

Any help would be very much appreciated. BTW does it have to do anything with redis cache used by BOA.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kevinquillen’s picture

I have had some trouble getting grunt-contrib-connect to work, but otherwise I used the LiveReload browser plugin in Chrome and Firefox and that has worked for the time being.

https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcge...

Once I figure out what's up with connect, I'll drop that code in.

aanjaneyam’s picture

I installed chrome browser extension and manually added

to html.tpl.php . After manually adding the script tag the browser says Live Reload connected but doesnt, automatically refresh with change in scss file (with grunt running and watching). I have added my css directory also in the watch task and upon change in scss the both (scss and css) seem to be showing as reloading in the terminal but nothing happens in the browser.

Without the manual addition of script tag the chrome extension cannot connect with a messase "No suitable livereload server found...." But we should not be using manual way of adding script to head when using with browser extension. How to configure the browser extension to work with grunt and livereload on a remote cloud server. I saw no preferences or customisation option in the chrome or firefox extension. Firefox also does not connect.

cejams’s picture

Drupal 7 includes stylesheets as @import rather than link tags. This format doesn't play well with LiveReload. As a result, you can see in the patch a new theme setting to insert stylesheets as link tags. You'd only want to use this in your development site, not production, since the @import method is more efficient. You also can't use the built in Drupal CSS aggregation with LiveReload, but I'm guessing you don't use that in development anyway!

I always use Grunt (and Bower) and can say that this theme setting will work with Grunt. Specifically I use the grunt-contrib-compass and grunt-contrib-watch. The Chrome & Firefox plugins will work without the need to add anything to your html.tpl.php.

nickBumgarner’s picture

cejams

Can you explain what your patch does, specifically?

cejams’s picture

Sorry nickBumgarner, Drupal is identifying me as possible spam, so I have to wait a very long time between comments .... I updated #3 above

cejams’s picture

Component: Miscellaneous » Code
Status: Active » Needs review
cejams’s picture

My apologies. #3 has a typo, please test #7 instead.

shauntyndall’s picture

Status: Needs review » Postponed (maintainer needs more info)

@cejams, I'm not able to replicate the issue and I'm not really confident the patch is needed. Can you provide more information on how to replicate the issue or other references describing LiveReload's incompatibility with the manor zurb_foundation implements css?

chrisjlee’s picture

Actually, this should be unnecessary. If you all are using grunt; the guidance is to install grunt-watch.

Otherwise, follow the instructions for manual installation of livereload: https://github.com/livereload/livereload-js

chrisjlee’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)