本文介绍了刚刚安装了 SASS,但无法获得它的版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从终端安装了 SASS,只需 gem install sass.我看到它说已成功安装 sass-3.2.9".

I installed SASS from the terminal, just gem install sass. And I see it says "Successfully installed sass-3.2.9."

但是,当我执行 sass --versionsass --v 时,我收到此错误:

However, when I then do sass --version or sass --v I get this error:

-bash: sass: 命令未找到

-bash: sass: command not found

我唯一能想到的是,当我在 Tuts+ 上做 Git 教程时,我遇到了本地与全局问题,或者我不得不编辑一个 bash_profile 文件.

The only thing I can think of is, when I was doing the Git tutorials on Tuts+ I ran into a local vs. global issue or I had to edit a bash_profile file.

这是我的用户目录中 bash_profile 文件中的内容:

This is what is inside the bash_profile file inside my user directory:

export PATH="/usr/local/bin:$PATH"

关于为什么我无法获得刚刚安装的 SASS 或 Compass 版本的任何想法或提示?(我只能得到 ruby --version.)

Any thoughts or tips on why I can't get the version of SASS or Compass I just installed? (I can only get ruby --version.)

推荐答案

得到答案!https://superuser.com/questions/600262/error-when-installing-and-trying-to-get-version-of-sass-via-terminal?noredirect=1#comment739892_600262

$ brew --prefix ruby
/usr/local/opt/ruby
$ stat -f%Y /usr/local/opt/ruby
../Cellar/ruby/2.0.0-p0
$ export PATH=/usr/local/opt/ruby/bin:$PATH
$ which sass
/usr/local/opt/ruby/bin/sass

这篇关于刚刚安装了 SASS,但无法获得它的版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-11 00:55