How to make Chrome understand the SASS/SCSS in your rails app(fonicmonkey.net) |
How to make Chrome understand the SASS/SCSS in your rails app(fonicmonkey.net) |
----
Michael Laccetti says:
Just a quick note that the ‘Experiments’ tab under the developer console will not show up unless you specifically enable it under chrome://flags (Enable Developer Tools experiments)
You can try using the alpha release of sass 3.3.0 to get real sourcemaps but I haven't had any luck getting it to work with rails. It also will not work with compass 0.13.alpha, you have to downgrade to 0.12.2.
- You need to be using 'sass-rails', not 'sass', in your Gemfile for config.sass to work. Don't put it in the :assets group, either.
- You must set config.sass.compress = false (or rather, you must not set it to true!)
- You'll probably need to blow away your assets cache (tmp/cache/assets/* or public/assets/*) to see the changes.
I just got it working with a Rails app at work, and I am pleased with the results. Chrome Web Inspector continues to make my life easier!
Second line of CSS/SCSS reference appears but it's like ..:4 and points to no file.
Screenshot: http://i.imgur.com/4EJBBjd.png
config.sass.compress = false
Clear you cached assets, restart your server and reload the page. That should hopefully fix it for you.
Here's a prefix example your css should output: @media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/kai\/Play\/live\/screen\.scss}line{font-family:\0000311}} .box { .. }
Hope this helps other understand why this occurs! :)