Updated to High Sierra and having trouble running compass

老子叫甜甜 提交于 2021-02-07 03:49:03

问题


I updated to High Sierra earlier this week and am having trouble running compass. When trying to run compass watch it gives me this error:

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

  • Tried to update ruby and failed. I have version 2.3. I don't have version 2.0 thats its looking for. so tried to change the path, failed again.
  • Also tried to update/reinstall compass.
  • I get an error saying I don't have permission to make changes.

回答1:


I had the same problem. Solved it by running:

$ sudo gem uninstall compass

$ gem update --system

$ sudo gem install compass

Hope it works for you!

UPDATE:

From ewartx: https://github.com/Compass/compass/issues/2129

\curl -sSL https://get.rvm.io | bash -s stable

rvm install 2.0.0

gem install compass




回答2:


If you don't want to revert, this worked for me (slightly modified from an answer here https://github.com/oklai/koala/issues/679)

  1. Open Terminal
  2. Install Homebrew: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  3. Do not close Terminal, open Mac Appstore and check Update, install all XCode Command Line Tools updates OR in my case, XCode Command Line Tools started install automaticly throught Terminal right after step 2.
  4. Back to Terminal
  5. Install Ruby: brew install rbenv ruby-build

At this point, install Compass (instead of SASS in original answer)

  1. Install Compass gem: sudo gem install -n /usr/local/bin compass



回答3:


I just ran into this as well. The solution was to make sure that the xCode command line tools were installed.

Run the following to install the needed development files.

xcode-select --install

Per @Adi's solution run this to uninstall compass and reinstall it.

sudo gem uninstall compass
gem update --system
sudo gem install compass

After that is complete you should be able to use compass and can re-run your command.



来源:https://stackoverflow.com/questions/46475101/updated-to-high-sierra-and-having-trouble-running-compass

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!