简体   繁体   中英

Getting Error on “compass compile” after upgrading to Catalina

Looking for the solution, since I'm now out of ideas how to fix that. Before I upgraded my Mac OS X to Catalina everything was fine.

What I tried already:

  • removed ruby sudo rvm implode and all the relations
  • reinstalled rvm
  • reinstalled sass
  • reinstalled compass

Any input would be much appreciated. Here is the full backtrace after running the command compass compile :

Errno::EROFS on line ["239"] of /Users/admin/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/fileutils.rb: Read-only file system @ dir_s_mkdir - /c
  /Users/admin/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/fileutils.rb:239:in `fu_mkdir'
  /Users/admin/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/fileutils.rb:217:in `block (2 levels) in mkdir_p'
  /Users/admin/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/fileutils.rb:215:in `reverse_each'
  /Users/admin/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/fileutils.rb:215:in `block in mkdir_p'
  /Users/admin/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/fileutils.rb:200:in `each'
  /Users/admin/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/fileutils.rb:200:in `mkdir_p'
  /Users/admin/.rvm/gems/ruby-2.6.3/gems/sass-3.4.25/lib/sass/cache_stores/filesystem.rb:38:in `_store'
  /Users/admin/.rvm/gems/ruby-2.6.3/gems/sass-3.4.25/lib/sass/cache_stores/base.rb:51:in `store'
  /Users/admin/.rvm/gems/ruby-2.6.3/gems/sass-3.4.25/lib/sass/cache_stores/chain.rb:19:in `block in store'
  /Users/admin/.rvm/gems/ruby-2.6.3/gems/sass-3.4.25/lib/sass/cache_stores/chain.rb:19:in `each'
  /Users/admin/.rvm/gems/ruby-2.6.3/gems/sass-3.4.25/lib/sass/cache_stores/chain.rb:19:in `store'
  /Users/admin/.rvm/gems/ruby-2.6.3/gems/sass-3.4.25/lib/sass/engine.rb:420:in `_to_tree'
  /Users/admin/.rvm/gems/ruby-2.6.3/gems/sass-3.4.25/lib/sass/engine.rb:315:in `to_tree'
  /Users/admin/.rvm/gems/ruby-2.6.3/gems/sass-3.4.25/lib/sass/plugin/staleness_checker.rb:184:in `tree'
  /Users/admin/.rvm/gems/ruby-2.6.3/gems/sass-3.4.25/lib/sass/plugin/staleness_checker.rb:174:in `compute_dependencies'
  /Users/admin/.rvm/gems/ruby-2.6.3/gems/sass-3.4.25/lib/sass/plugin/staleness_checker.rb:149:in `dependencies'
  /Users/admin/.rvm/gems/ruby-2.6.3/gems/sass-3.4.25/lib/sass/plugin/staleness_checker.rb:125:in `dependencies_stale?'
  /Users/admin/.rvm/gems/ruby-2.6.3/gems/sass-3.4.25/lib/sass/plugin/staleness_checker.rb:166:in `block in dependency_updated?'
  /Users/admin/.rvm/gems/ruby-2.6.3/gems/sass-3.4.25/lib/sass/plugin/staleness_checker.rb:81:in `stylesheet_modified_since?'
  /Users/admin/.rvm/gems/ruby-2.6.3/gems/sass-3.4.25/lib/sass/plugin/staleness_checker.rb:69:in `stylesheet_needs_update?'
  /Users/admin/.rvm/gems/ruby-2.6.3/gems/sass-3.4.25/lib/sass/plugin/compiler.rb:211:in `block in update_stylesheets'
  /Users/admin/.rvm/gems/ruby-2.6.3/gems/sass-3.4.25/lib/sass/plugin/compiler.rb:209:in `each'
  /Users/admin/.rvm/gems/ruby-2.6.3/gems/sass-3.4.25/lib/sass/plugin/compiler.rb:209:in `update_stylesheets'
  /Users/admin/.rvm/gems/ruby-2.6.3/gems/compass-1.0.3/lib/compass/sass_compiler.rb:40:in `compile!'
  /Users/admin/.rvm/gems/ruby-2.6.3/gems/compass-1.0.3/lib/compass/commands/update_project.rb:49:in `perform'
  /Users/admin/.rvm/gems/ruby-2.6.3/gems/compass-1.0.3/lib/compass/commands/base.rb:18:in `execute'
  /Users/admin/.rvm/gems/ruby-2.6.3/gems/compass-1.0.3/lib/compass/commands/project_base.rb:19:in `execute'
  /Users/admin/.rvm/gems/ruby-2.6.3/gems/compass-1.0.3/lib/compass/exec/sub_command_ui.rb:43:in `perform!'
  /Users/admin/.rvm/gems/ruby-2.6.3/gems/compass-1.0.3/lib/compass/exec/sub_command_ui.rb:15:in `run!'
  /Users/admin/.rvm/gems/ruby-2.6.3/gems/compass-1.0.3/bin/compass:30:in `block in <top (required)>'
  /Users/admin/.rvm/gems/ruby-2.6.3/gems/compass-1.0.3/bin/compass:44:in `<top (required)>'
  /Users/admin/.rvm/gems/ruby-2.6.3/bin/compass:23:in `load'
  /Users/admin/.rvm/gems/ruby-2.6.3/bin/compass:23:in `<main>'
  /Users/admin/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `eval'
  /Users/admin/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `<main>'

I had the similar problem, you can try to launch xcode-select --install and after add

export CPATH="/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include"
export SDKROOT="/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk"

to your .bash_profile

The problem was solved by importing the entire compass library into my project from the following Compass' repository: https://github.com/Compass/compass The library is located here:https://github.com/Compass/compass/tree/stable/core/stylesheets

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM