博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

本地安装Sass,Compass

Posted on 2016-04-05 11:18  随遇  阅读(331)  评论(0编辑  收藏  举报

使用本地的gem文件来安装Sass和Compass。

1.安装Ruby

http://rubyinstaller.org/downloads/

下载之后双击安装即可,在安装过程中可以选择“Add Ruby excuteables to your PATH”

测试安装

C:\>ruby --version

2.安装Dev Kit

http://rubyinstaller.org/downloads/

提取文件到文件夹:C:\RubyDevKit,启动cmd运行下面的命令

C:\RubyDevKit>devkitvars.bat
Adding the DevKit to PATH...

C:\RubyDevKit>ruby dk.rb init
[INFO] found RubyInstaller v1.9.3 at C:/Ruby193

Initialization complete! Please review and modify the auto-generated
'config.yml' file to ensure it contains the root directories to all
of the installed Rubies you want enhanced by the DevKit.

C:\RubyDevKit>ruby dk.rb install
[INFO] Updating convenience notice gem override for 'C:/Ruby193'
[INFO] Installing 'C:/Ruby193/lib/ruby/site_ruby/devkit.rb'

测试DevKit安装

C:\RubyDevKit>bash
bash-3.1$ gcc --version
gcc.exe (tdm-1) 4.5.2
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

bash-3.1$ exit
exit

3.本地安装Compass

在https://rubygems.org中查找Compass.下载compass和相关的运行时依赖文件到本目录:D:\compass\

启动cmd并且进入D:\compass>,执行命令 gem install --local compass-1.0.3.gem即可

附上compass以及它所依赖的相关文件。

链接: http://pan.baidu.com/s/1jIKY7Q2 密码: mcn4