OS X El Capitan(10.11)更新后无法打开Compass

时间:2015-10-08 16:20:17

标签: ruby macos compass-sass compass

我更新到OS X El Capitan(10.11),现在我的grunt脚本无效。

当我运行指南针时:

compass version

我明白了:

Michaels-MacBook-Pro:wnmu thegreyspot$ compass version
/Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:212:in `initialize': Permission denied - /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-15/2.0.0/nokogiri-1.6.6.2/gem_make.out (Errno::EACCES)
    from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:212:in `open'
    from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:212:in `write_gem_make_out'
    from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:132:in `build_error'
    from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:171:in `rescue in build_extension'
    from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:156:in `build_extension'
    from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:198:in `block in build_extensions'
    from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:195:in `each'
    from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:195:in `build_extensions'
    from /Library/Ruby/Site/2.0.0/rubygems/specification.rb:1436:in `block in build_extensions'
    from /Library/Ruby/Site/2.0.0/rubygems/user_interaction.rb:45:in `use_ui'
    from /Library/Ruby/Site/2.0.0/rubygems/specification.rb:1434:in `build_extensions'
    from /Library/Ruby/Site/2.0.0/rubygems/stub_specification.rb:60:in `build_extensions'
    from /Library/Ruby/Site/2.0.0/rubygems/basic_specification.rb:56:in `contains_requirable_file?'
    from /Library/Ruby/Site/2.0.0/rubygems/specification.rb:925:in `block in find_inactive_by_path'
    from /Library/Ruby/Site/2.0.0/rubygems/specification.rb:924:in `each'
    from /Library/Ruby/Site/2.0.0/rubygems/specification.rb:924:in `find'
    from /Library/Ruby/Site/2.0.0/rubygems/specification.rb:924:in `find_inactive_by_path'
    from /Library/Ruby/Site/2.0.0/rubygems.rb:185:in `try_activate'
    from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:132:in `rescue in require'
    from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:144:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/compass-1.1.0.alpha.3/lib/compass/sass_extensions/sprites/engines/chunky_png_engine.rb:2:in `<top (required)>'
    from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/compass-1.1.0.alpha.3/lib/compass/sass_extensions/sprites/engines.rb:25:in `<top (required)>'
    from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/compass-1.1.0.alpha.3/lib/compass/sass_extensions/sprites.rb:20:in `<top (required)>'
    from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/compass-1.1.0.alpha.3/lib/compass/sass_extensions.rb:9:in `<top (required)>'
    from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/compass-1.1.0.alpha.3/lib/compass.rb:14:in `block in <top (required)>'
    from /Library/Ruby/Gems/2.0.0/gems/compass-1.1.0.alpha.3/lib/compass.rb:13:in `each'
    from /Library/Ruby/Gems/2.0.0/gems/compass-1.1.0.alpha.3/lib/compass.rb:13:in `<top (required)>'
    from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/compass-1.1.0.alpha.3/bin/compass:20:in `block in <top (required)>'
    from /Library/Ruby/Gems/2.0.0/gems/compass-1.1.0.alpha.3/bin/compass:8:in `fallback_load_path'
    from /Library/Ruby/Gems/2.0.0/gems/compass-1.1.0.alpha.3/bin/compass:19:in `<top (required)>'
    from /usr/local/bin/compass:23:in `load'
    from /usr/local/bin/compass:23:in `<main>'

我尝试运行sudo gem update -n /usr/local/binsudo gem install -n /usr/local/bin compass但没有成功。

我已在应用商店中更新了XCode。所以我在7.0.1

1 个答案:

答案 0 :(得分:-1)

您可以使用

修复权限
sudo chown -R `whoami` /Library/Ruby