-
Notifications
You must be signed in to change notification settings - Fork 62
Rails 4.2.1 + Sprockets 3.0.2 breaks browserSync #19
Comments
Weird! That's super annoying! Thanks for detailing this. Short term solution would be to only include gem assets in your application.js/css files, and pull in your gulp generated files separately with for example: <%= stylesheet_link_tag 'application.css' %>
<link rel="stylesheet" href="<% gulp_asset_path('stylesheets/global.css')%>"> |
I've faced same problem and the best solution I've found is to downgrade to sprockets 2.12.3.( |
I'm currently doing something like this:
|
Seems very fragile here is a snapshot (https://40.media.tumblr.com/3778bd65154560b6840eec61e2a2ab70/tumblr_npcek1oAy31qzp3szo1_1280.png) of the difference betweens what's installed on the gem side as of today (my version on the right, causing the problem, the one from this repo on the left) It does not break browser sync completely, just the css reload when scss or sass files are modified (you have to reload the page manually to see css changes) |
I made a PR to keep sprockets downgraded also had this problem #28 |
I disabled See: |
I use a workaround in the Gulp task instead of downgrading Sprockets or skipping the asset pipeline completely. The processed CSS files are being renamed with the notorius Example:
|
On a recent project I noticed that rails was adding ".self.(css|js)" to asset tags, which browsersync can't handle. I wasn't sure if this was just my project so I tested with this repo. I also made some very minor changes to get it working on my system (like updating browsersync version). This is with node 0.12.2 and running npm update/bundle update.
The included tags:
My git diff:
diff --git a/Gemfile b/Gemfile
index 7c0a052..6457fff 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,10 +1,10 @@
source 'https://rubygems.org'
The text was updated successfully, but these errors were encountered: