bash Sass - 安装错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/31443530/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Sass - Error Installing
提问by Joey Orlando
I had the Ruby gem Sass installed recently and have been frequently using it for an app I'm working on. Today I went to go run sass --watch scss:css as I normally would and noticed I got the following error:
我最近安装了 Ruby gem Sass,并且经常将它用于我正在开发的应用程序。今天我像往常一样去运行 sass --watch scss:css 并注意到我收到以下错误:
-bash: sass: command not found
I then tried running the following line and got this output:
然后我尝试运行以下行并获得此输出:
~$ sudo gem install sass
ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/sass
I would consider myself a novice when it comes to interpreting shell/bash errors, any suggestions as to what might be causing this?
在解释 shell/bash 错误时,我会认为自己是新手,有什么关于可能导致这种情况的建议吗?
Update
更新
I've since tried @jperelli's suggestion and got the following (ps I am on Mac OS):
我已经尝试过@jperelli 的建议并得到以下结果(ps 我在 Mac OS 上):
~$ sudo gem update bundler
Updating installed gems
Updating bundler
Fetching: bundler-1.10.5.gem (100%)
ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/bundle
回答by Leo
If you have still this problem, you may try:
如果您仍然有这个问题,您可以尝试:
$ sudo gem install -n /usr/local/bin sass
I had almost the same issue (for compass) with the latest update to OS XEl Capitan, and it worked for me. Just use it like this:
我在OS X El Capitan的最新更新中遇到了几乎相同的问题(对于指南针),它对我有用。只需像这样使用它:
$ sudo gem install -n /usr/local/bin gem_package_name
Good Luck!
祝你好运!
回答by jperelli
Maybe you stupmed a bug in bundler itself https://github.com/bundler/bundler/issues/1977
也许你在 bundler 中发现了一个错误https://github.com/bundler/bundler/issues/1977
Try upgrading bundler and then installing sass again
尝试升级 bundler,然后再次安装 sass
sudo gem update bundler
sudo gem install sass
Alternatively, you can install sass from OS repositories
或者,您可以从操作系统存储库安装 sass
# assuming you use ubuntu
sudo apt-get install ruby-sass