根据sass中文网站安装步骤会发现 切换淘宝gem镜像的时候总是不成功 是因为淘宝镜像地址已经换了
下载ruby windows下的可执行文件.exe
进入ruby官网,下载对应版本。
安装ruby
安装的时候需要注意勾选 Add Ruby executables to your PATH 添加到系统环境变量
ruby -v
ruby 2.5.1p57 (2018-03-29 revision 63029) [x64-mingw32]
安装sass
进入淘宝rubygem镜像网站 https://ruby.taobao.org/ 执行以下命令:
gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/
gem sources -l
//出现如下结果
*** CURRENT SOURCES ***
https://gems.ruby-china.org
//再执行
gem install sass
//执行结果
Fetching: rb-fsevent-0.10.3.gem (100%)
Successfully installed rb-fsevent-0.10.3
Fetching: ffi-1.9.25-x64-mingw32.gem (100%)
Successfully installed ffi-1.9.25-x64-mingw32
Fetching: rb-inotify-0.9.10.gem (100%)
Successfully installed rb-inotify-0.9.10
Fetching: sass-listen-4.0.0.gem (100%)
Successfully installed sass-listen-4.0.0
Fetching: sass-3.5.7.gem (100%)
sass -v
Ruby Sass 3.5.7 //sass安装完毕