如何使用指南针和scss要求mixin(来自配置)

时间:2013-12-06 17:10:31

标签: css rubygems sass compass-sass mixins

我无法成功安装指南针插件(?)我在配置中使用了require并希望得到任何帮助。

我打算测试一下: http://aaronrussell.co.uk/legacy/cross-browser-rgba-support/

步骤相当简单,通过终端安装,需要在配置的顶部,最后包含mixin ..(如url中所示)

所以我通过终端安装,似乎有用:>

➜  assets  sudo gem install compass-rgbapng
Password:
Fetching: chunky_png-1.2.9.gem (100%)
Successfully installed chunky_png-1.2.9
Fetching: fssm-0.2.10.gem (100%)
Successfully installed fssm-0.2.10
Fetching: compass-0.12.2.gem (100%)
Successfully installed compass-0.12.2
Fetching: compass-rgbapng-0.2.1.gem (100%)
Successfully installed compass-rgbapng-0.2.1
Parsing documentation for chunky_png-1.2.9
Installing ri documentation for chunky_png-1.2.9
Parsing documentation for fssm-0.2.10
Installing ri documentation for fssm-0.2.10
Parsing documentation for compass-0.12.2
Installing ri documentation for compass-0.12.2
Parsing documentation for compass-rgbapng-0.2.1
Installing ri documentation for compass-rgbapng-0.2.1
4 gems installed
➜  assets  compass watch 

我在罗盘配置文件的顶部添加了需求:>

# Require any additional compass plugins here.
require "rgbapng"

# Set this to the root of your project when deployed:
http_path = "/assets/"
css_dir = "stylesheets"
sass_dir = "sass"
images_dir = "images"
javascripts_dir = "javascripts"

最后在我的mixins scss文件中导入mixin:>

@import "rgbapng";

然后我再次开始观看并收到此错误?

 ➜  assets  compass watch                   
 >>> Compass is polling for changes. Press Ctrl-C to Stop.
 >>> Change detected at 17:00:17 to: helpers/_mixins.scss
     error sass/base.scss (Line 1 of sass/helpers/_mixins.scss: File to import not found or unreadable: rgbapng.

任何人都可以指出我正确的方向..

1 个答案:

答案 0 :(得分:0)

它随机开始工作..我认为终端在开始正常工作之前已经重置了几次