导入的文件未找到或无法读取:susy。

6
我无法确定我的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/

在查看我的项目时,我看到了上面的第一个错误。

我不知道哪里出错了。

谢谢。


1
看起来不错。这些问题中有哪些与之相关?https://github.com/ericam/susy/issues/search?q=not%20found%20or%20unreadable - Miriam Suzanne
4个回答

3

我遇到了完全相同的问题。感谢您找到了答案。我可以建议您接受自己的答案,以便更清楚地告诉其他人只有一个答案。当我浏览问题时,第一件事就是寻找那个绿色的勾号。 - curt
我说得太早了。我的问题略有不同。我的错误出在需要“susy”。我认为移动config.rb只是导致编译器找不到它。现在我在导入时遇到了错误。 - curt
我没有使用 config.rbcompass :( - Jamie Hutber

0
虽然这不是“正确的答案”,但我遇到了同样的错误,并意识到我试图使用SASS构建,而不是使用Compass构建系统。
有点傻,但希望如果其他人犯同样的错误,这可能会有所帮助:D/

0

尝试一下

gem install compass --pre

这对我有用


0

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

希望这能帮助像我一样的新手。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接