windows下安装sass/scss
2015-08-12 13:25
701 查看
转载自:http://www.th7.cn/Program/Ruby/201502/388940.shtml
一、安装ruby。到ruby官网下载最新的ruby软件,然后开始安装ruby,最好放到系统下,安装时勾选添加环境变量的路径,如下图:
二、安装sass。打开命令窗口,输入如下命令gem install sass,这时可能会报这样的错误,
ERROR: Could not find a valid gem 'sass' (>= 0) in any repository
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
Errno::ETIMEDOUT: A connection attempt failed because the connected party di
d not properly respond after a period of time, or established connection failed
because connected host has failed to respond. - connect(2) (http://rubygems.org/
latest_specs.4.8.gz),这个错误是路径被墙掉了,可以加上一个国内的库,在命令窗口中输入如下命令:
gem sources -a http://ruby.taobao.org回车,然后再输入gem install sass安装sass即可
三、安装compass。输入命令gem
install compass,这时可能会报这样的错误
The 'ffi' native gem requires installed build tools.
Please update your PATH to include build
tools
or download the DevKit
from 'http://rubyinstaller.org/downloads' and follow the instructions
at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'
这就下载安装devkit了,到ruby官网下载devkit,解压到C:/DevKit下,
C:/DevKit>ruby dk.rb init
[INFO] found RubyInstaller v1.9.3 at C:/Ruby193
Initialization complete! Please review and modify the auto-ge
'config.yml' file to ensure it contains the root directories
of the installed Rubies you want enhanced by the DevKit.
C:/DevKit>ruby dk.rb install
[INFO] Updating convenience notice gem override for 'C:/Ruby1
[INFO] Installing 'C:/Ruby193/lib/ruby/site_ruby/devkit.rb'
C:/DevKit>gem install rdiscount --platform=ruby
Fetching: rdiscount-1.6.8.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Successfully installed rdiscount-1.6.8
1 gem installed
Installing ri documentation for rdiscount-1.6.8...
Installing RDoc documentation for rdiscount-1.6.8...
OK!再次gem install compass即可。
表达不好请谅解!
一、安装ruby。到ruby官网下载最新的ruby软件,然后开始安装ruby,最好放到系统下,安装时勾选添加环境变量的路径,如下图:
二、安装sass。打开命令窗口,输入如下命令gem install sass,这时可能会报这样的错误,
ERROR: Could not find a valid gem 'sass' (>= 0) in any repository
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
Errno::ETIMEDOUT: A connection attempt failed because the connected party di
d not properly respond after a period of time, or established connection failed
because connected host has failed to respond. - connect(2) (http://rubygems.org/
latest_specs.4.8.gz),这个错误是路径被墙掉了,可以加上一个国内的库,在命令窗口中输入如下命令:
gem sources -a http://ruby.taobao.org回车,然后再输入gem install sass安装sass即可
三、安装compass。输入命令gem
install compass,这时可能会报这样的错误
The 'ffi' native gem requires installed build tools.
Please update your PATH to include build
tools
or download the DevKit
from 'http://rubyinstaller.org/downloads' and follow the instructions
at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'
这就下载安装devkit了,到ruby官网下载devkit,解压到C:/DevKit下,
C:/DevKit>ruby dk.rb init
[INFO] found RubyInstaller v1.9.3 at C:/Ruby193
Initialization complete! Please review and modify the auto-ge
'config.yml' file to ensure it contains the root directories
of the installed Rubies you want enhanced by the DevKit.
C:/DevKit>ruby dk.rb install
[INFO] Updating convenience notice gem override for 'C:/Ruby1
[INFO] Installing 'C:/Ruby193/lib/ruby/site_ruby/devkit.rb'
C:/DevKit>gem install rdiscount --platform=ruby
Fetching: rdiscount-1.6.8.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Successfully installed rdiscount-1.6.8
1 gem installed
Installing ri documentation for rdiscount-1.6.8...
Installing RDoc documentation for rdiscount-1.6.8...
OK!再次gem install compass即可。
表达不好请谅解!
相关文章推荐
- SASS编译
- SASS调试
- 红宝石(Ruby)史话
- Ruby简明教程之循环语句介绍
- ruby 一些简单的例子
- Ruby 之 class 中的 private、 protected、public
- Ruby中操作文件的方法介绍
- Ruby中的集合编写指南
- CentOS 6.3下编译安装Ruby 2.0笔记
- Ruby编程中关于中断和返回的用法教程
- Ruby中的异常处理代码编写示例
- Ruby中的变量学习总结
- 几个加速Ruby on Rails的编程技巧
- Ruby配置rspec和RestClient来检测服务器
- 分析Cache 在 Ruby China 里面的应用情况
- Ruby中数组的一些相关使用方法
- 编写Ruby代码注释时需要注意的一些问题
- Ruby类继承、抽象类、类拓展混入、代理类实例
- Ruby简明教程之方法(Method)介绍
- 比较详细的ruby symbol 学习资料