docpad / docpad-plugin-sass

Adds support for the SASS and SCSS CSS pre-processors to DocPad. It also supports the Compass framework.
Other
13 stars 6 forks source link

@import susy (and others) #2

Closed yumyo closed 11 years ago

yumyo commented 11 years ago

Hi guys, I'm having trouble loading "susy" as well as other gems ,,, my docpad.coffee is simply:

docpadConfig = {
    plugins:
        sass:
            compass: true
            requireLibraries:['susy']      
}

then @import "susy"; at the top of my style.css.scss file At docpad run I get

error: An error occured:
Error: Syntax error: File to import not found or unreadable: susy.
              Load paths:
                ~/Sites/kdocpad
               ~/Sites/kdocpad/src/documents/styles
               ~/Sites/kdocpad/sass
                ~/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/frameworks/blueprint/stylesheets
               ~/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/frameworks/compass/stylesheets
                Compass::SpriteImporter
        on line 1 of standard input
  Use --trace for backtrace.

    at ChildProcess.balUtilModules.spawn (~/Sites/kdocpad/node_modules/docpad-plugin-sass/node_modules/bal-util/out/lib/modules.js:97:19)
    at ChildProcess.EventEmitter.emit (events.js:99:17)
    at Process._handle.onexit (child_process.js:678:10)
balupton commented 11 years ago

Worked fine for me... Can you give me access to your repo?

Also looking at the susy docs perhaps you have the old susy library installed? http://susy.oddbird.net/guides/getting-started/#troubleshooting-compass-install

yumyo commented 11 years ago

Thank you Benjamin for your (as usual) prompt reply. Since it works for you, I'm almost sure my problems came from wrong paths configurations. DocPad is amazing but, as a designer, I need to gain a better understanding on how to handle the ruby environment. I'm going to make a public repo while keep trying to inspect my ruby's configs.

yumyo commented 11 years ago

...my ruby configs seems good enough to start a blank new compass project and @import 'susy' as well as other gems like 'modular-scale'. So I've started a new docpad site using the boilerplate skeleton, added the sass plugin and updated docpad.coffee file with the proper plugin options and now everything works. Anyone interested could take a look at this sample repo here: https://github.com/yumyo/test.docpad

jcloutz commented 11 years ago

I am having this same issue when trying to use zurb-foundation.

config

docpadConfig = {
    plugins:
        sass:
            compass: true
            debugInfo: true
            requireLibraries: ["zurb-foundation"]
            outputStyle: "compressed"
}

This is the line the that is causing the error @import "foundation";

console output Ubuntu 13.04

warning: Something went wrong while rendering: styles/style.css.scss
error: Something went wrong with the action
error: An error occured: 
Error: Syntax error: File to import not found or unreadable: foundation.
              Load paths:
                /home/elemental-shift/Web/test
                /home/elemental-shift/Web/test/src/documents/styles
                /home/elemental-shift/Web/test/sass
                /var/lib/gems/1.9.1/gems/compass-0.12.2/frameworks/blueprint/stylesheets
                /var/lib/gems/1.9.1/gems/compass-0.12.2/frameworks/compass/stylesheets
                Compass::SpriteImporter
        on line 8 of /home/elemental-shift/Web/test/src/documents/styles/_foundation-base.scss
        from line 1 of standard input
  Use --trace for backtrace.

    at ChildProcess.<anonymous> (/home/elemental-shift/Web/test/node_modules/docpad-plugin-sass/node_modul
es/safeps/out/lib/safeps.js:154:21)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:735:16)
    at Process.ChildProcess._handle.onexit (child_process.js:802:5)