【问题标题】:Codekit file permission issues (Read-only file system @ dir_s_mkdir - /.sass-cache)Codekit 文件权限问题(只读文件系统 @ dir_s_mkdir - /.sass-cache)
【发布时间】:2020-03-15 04:54:56
【问题描述】:

得到以下错误:

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

真的很痛苦,任何帮助将不胜感激。

在我更新到 Mac OS Catalina 之后发生。 目前在 10.15.1 (19B88)。

【问题讨论】:

    标签: ruby sass permissions compass-sass codekit


    【解决方案1】:

    /.sass-cache 将是位于文件系统根目录的 Sass 缓存目录。它不应该尝试在那里创建该目录。

    然而,这个 Ruby 正在运行,它没有在正确的工作目录下运行,或者需要传递一个基本路径才能运行。

    【讨论】:

    • 我该怎么做?
    • @AsaadMahmood 我不知道。您没有在问题中包含任何信息来表明您正在运行什么来获取此错误
    • 通过“Codekit”codekitapp.com编译时出现此错误。
    【解决方案2】:

    在 Catalina 中,Ruby Sass 尝试写入缓存的磁盘根目录现在是只读的,因此它失败了。

    我改用波旁威士忌。我还自己创建了一些在 compass 中的 mixin。

    【讨论】:

      【解决方案3】:

      Ruby Sass 已弃用。 在 Codekit 3 中,您应该改用 libsass 编译器。 如果您使用 Compass,则 Libsass 不可用。 如果有,可以在config.rb中设置缓存位置路径:

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

      【讨论】:

      • 对于 3.12.1+ 版本,Dart Sass 现在是默认的 sass 编译器。您仍然需要使用 Dart Sass 在 config.rb 中添加 sass_options = { :cache_location => '/tmp/sass_cache' }
      【解决方案4】:

      添加

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

      到我的 config.rb 文件为我解决了这个问题。

      【讨论】:

        猜你喜欢
        • 2011-10-29
        • 1970-01-01
        • 2014-08-28
        • 2020-02-17
        • 1970-01-01
        • 2018-04-10
        • 2023-03-16
        • 2012-03-11
        • 1970-01-01
        相关资源
        最近更新 更多