概述
转载自: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'
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即可。
表达不好请谅解!最后
以上就是健康向日葵为你收集整理的windows下安装sass/scss的全部内容,希望文章能够帮你解决windows下安装sass/scss所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复