1.先安装最新版的ruby:css
传送门:http://rubyinstaller.org/downloads/
安装的时候,必定要容许写入环境变量(add to Path)
须要安装对应的安装包(64位或者32位)sass
2.安装完成后,再打开 开始 -> 运行 -> cmdruby
3.输入以下代码:编辑器
gem sources --remove https://rubygems.org/ gem sources -a https://ruby.taobao.org/ gem sources -l #输出 *** CURRENT SOURCES *** https://ruby.taobao.org # 请确保只有 ruby.taobao.org
有一段时间,淘宝的镜像不能用了,能够去百度下别的镜像,好比ruby-chinaspa
$ gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/ $ gem sources -l https://gems.ruby-china.org # 确保只有 gems.ruby-china.org
4.再输入:插件
gem install sass gem install compass
这一步是为了在ruby安装路径下生成SCSS.bat文件去监听SCSS文件。code
5.安装完成以后,咱们须要为IDEA添加file watcher插件ip
其中,arguments的配置为:rem
–no-cache –update –style compressed $FileName$:$FileNameWithoutExtension$.css
6.安装成功,重启编辑器便可。get