Compass file not found error in sass cache

Recently, I was working on a sass project and then started to get strange errors about a file not being found. The error referenced a non-existent file in the sass cache folder. I wasn’t sure why the file was not being generated, I had never seen this before.

The error came in two forms:

I ran “cache clean” but it only temporarily fixed the problem, and after saving the error would reappear.

After double checking imports I was convinced that my imports were done correctly, and starting searching online.

It turns out my .sass-cache path was too long, and the file was silently failing and not being outputted to that directory. It never mentioned anywhere that my path was too long, I was trying a suggestion found here:

To fix it,
Add this line to to your config.rb

For the record I am using:
compass 1.0.3
ruby 2.3.2

One thought on “Compass file not found error in sass cache

Leave a Reply

Your email address will not be published. Required fields are marked *