【问题标题】:File to import not found or unreadable: susy找不到或无法读取要导入的文件:susy
【发布时间】:2012-10-12 22:38:03
【问题描述】:

我只是想不通我的 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/

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

我看不出哪里出错了。

谢谢。

【问题讨论】:

标签: compass-sass susy-compass


【解决方案1】:

按照这里的解决方案。固定的。 https://github.com/ericam/susy/issues/21

【讨论】:

  • 我遇到了完全相同的问题。感谢您找到答案。我是否可以建议您接受自己的答案,以便其他人更清楚地知道有一个答案。当我向下滚动一个问题时,我做的第一件事就是寻找那个绿色的复选标记。
  • 我说得太早了。我的问题略有不同。我的错误是需要“susy”。我认为移动 config.rb 只是导致编译器找不到它。现在我在导入时遇到错误。
  • 我没有使用config.rb 也没有使用compass :(
【解决方案2】:

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

我希望这可以帮助像我这样的其他菜鸟。

【讨论】:

    【解决方案3】:

    试试

    gem install compass --pre
    

    这对我有用

    【讨论】:

      【解决方案4】:

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

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

      【讨论】:

        猜你喜欢
        • 2017-04-11
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2019-10-26
        • 2011-11-30
        • 2020-11-13
        • 2019-08-08
        • 2013-02-01
        相关资源
        最近更新 更多