2017-10-12 34 views
2

更新的MacOS到HighSierra,试图推出SCSS守望得到这个:为什么Sass在HighSierra上倒下?

-bash: /usr/local/bin/sass: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory

当我试图用

sudo gem install sass

它,我看到这个错误重新安装:

Building native extensions. This could take a while... ERROR: Error installing sass: ERROR: Failed to build gem native extension.

current directory: /Library/Ruby/Gems/2.3.0/gems/ffi-1.9.18/ext/ffi_c 

/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20171012-1933-1pk37g.rb extconf.rb mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/ffi-1.9.18 for inspection. Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-17/2.3.0/ffi-1.9.18/gem_make.out

我该如何解决它?

+0

我有同样的问题 - 你找到一个解决? – Sam

+0

@Sam Nope。被迫用Gulp代替Scss编译器 –

回答

1

我跟着从iamcubcs该解决方案(https://github.com/oklai/koala/issues/679

  1. 打开终端
  2. 安装家酿:ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  3. 不要关闭终端,打开苹果的Appstore,检查更新,安装所有的XCode命令行工具的更新或者在我的情况下,XCode命令行工具在步骤2后立即开始自动安装在终端上。
  4. 返回终端
  5. 安装Ruby:
brew install rbenv ruby-build
  6. 安装SASS宝石:sudo gem install -n /usr/local/bin sass

这为我工作

+0

也为我工作。 –