要导入的文件未找到或不可读:susy

时间:2012-10-23 03:02:59

标签: compass-sass susy-compass

我无法弄清楚我与Susy的设置有什么问题。 我在OS X 10.7.4

我跟在这里:http://susy.oddbird.net/guides/getting-started/

错误

Syntax error: File to import not found or unreadable: susy.
Load paths:
Users/simon/Websites/wpsvntree/trunk/sass
/Users/simon/.gem/ruby/1.8/gems/compass-0.11.7/frameworks/blueprint/stylesheets
/Users/simon/.gem/ruby/1.8/gems/compass-0.11.7/frameworks/compass/stylesheets
            Compass::SpriteImporter
on line 2 of /Users/simon/Websites/wpsvntree/trunk/sass/_base.sass
from line 2 of /Users/simon/Websites/wpsvntree/trunk/sass/screen.sass

我安装的宝石:

*** LOCAL GEMS ***

chunky_png (1.2.6, 1.2.5)
compass (0.12.2, 0.11.7)
compass-boilerplate-plugin (0.1.0)
compass-h5bp (0.0.5, 0.0.2)
compass-rails (1.0.3)
fssm (0.2.9, 0.2.8.1)
html5-boilerplate (2.1.0)
sass (3.2.1, 3.1.15)
susy (1.0.3)

我的config.rb文件位于项目的根目录

require 'susy' 
# Require any additional compass plugins here.

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

# You can select your preferred output style here (can be overridden via the command line):
# output_style = :expanded or :nested or :compact or :compressed

# To enable relative paths to assets via compass helper functions. Uncomment:
relative_assets = true

_base.scss

// ---------------------------------------------------------------------------
// Imports
@import "susy";

/* GRID SETUP
----------------------------------------------------------------------------------*/

$total-columns  : 12;
$column-width   : 4em;
$gutter-width   : 1em;
$grid-padding   : $gutter-width;
$show-grid-backgrounds  : true;
/* SECTION
----------------------------------------------------------------------------------*/

screen.scss

 @import "base";
 .container {
  @include container;
  @include susy-grid-background;
 }

我从wpsvntree目录运行此命令:compass create trunk -r susy -u susy 成功

然后compass watch trunk/

查看我的项目我看到上面的第一个错误。

我看不出我哪里出错了。

感谢。

4 个答案:

答案 0 :(得分:3)

遵循此处的解决方案。固定。 https://github.com/ericam/susy/issues/21

答案 1 :(得分:0)

我遇到了这个问题,发现我的config.rb文件中的语法错误。正确的行是require "susy"但是我在require和susy之间有一个相同的符号,这是错误的。

我希望像我一样帮助其他新手。

答案 2 :(得分:0)

尝试

gem install compass --pre

这对我有用

答案 3 :(得分:0)

虽然它可能不是“正确答案”但我遇到了同样的错误,并意识到我正在尝试使用SASS构建,而不是使用Compass构建系统。

我知道有点傻,但希望如果有人犯了同样的错误,那可能会有所帮助:D /