Codekit file permission issues (Read-only file system @ dir_s_mkdir - /.sass-cache)

2.3k Views Asked by At

Getting the following error:

Compiling failed with this error: Errno::EROFS on line ["239"] of /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb: Read-only file system @ dir_s_mkdir - /.sass-cache
Run with --trace to see the full backtrace

Really painful, any help would be appreciated.

Happened after my update to Mac OS Catalina. Currently on 10.15.1 (19B88).

4

There are 4 best solutions below

1
Julien Menichini On BEST ANSWER

Ruby Sass is deprecated. In Codekit 3 you should use libsass compiler instead. Libsass is not available if you use Compass. If so, you can set the cache location path in the config.rb:

sass_options = { :cache_location => '/tmp/sass_cache' }

3
Max On

/.sass-cache would be a Sass cache directory at the root of your file system. It should not be trying to create that directory there.

However this Ruby is getting run, it's not running with the right working directory, or needs to be passed a base path to run in.

0
Asaad Mahmood On

In Catalina, the disk root where Ruby Sass attempts to write that cache is now read-only, so it fails.

I used Bourbon instead. I also created some of the mixins that were in compass myself.

0
OldDew On

Adding

line_comments = false
output_style = :compressed
sourcemap = true
asset_cache_buster = :none 
cache = false

to my config.rb file fixed this for me.