Search code examples
ruby-on-railssasslibsass

sassc-rails assets changes not being compiled


I am trying to convert from sass-rails to sassc-rails. I am using rails 4.2.2.

When I use sassc-rails, changes to my scss files are not being reflected in the view, even if I stop and restart the server (I have turned off spring). If I stop the server and do a rm -r tmp/cache/assets, the changes are reflected.

If I go back to sass-rails it works properly, though I have to do a rm -r tmp/cache/assets before I restart the server to have it working properly.

How do I fix this?


Solution

  • This was fixed by removing all the file suffixes in the application.css file. For example

    @import 'pages.css.scss'
    @import 'morris.css'
    

    to

    @import 'pages'
    @import 'morris'
    

    This was solved at sassc-rails thanks to boffbowsh and bolandrm

    Note that there appears to be other causes of this problem, so another approach is to turn off asset caching.