1

Need assistance with getting gulp/gulp-sass to recognize susy. Im running out of ideas and need a 2nd set of eyes. Thank you for feedback.

Error:

[gulp] [gulp-sass] source string:1: error: file to import not found or unreadable: "susy"

gem list

rubygems-update (2.2.2)
rubyzip (1.0.0)
rvm (1.11.3.8)
sass (3.3.7)
selenium-webdriver (2.37.0)
slop (3.4.6)
sorcerer (1.0.2)
susy (2.1.2)

Config.rb

require 'susy'

Gemfile

source 'https://rubygems.org'
gem 'susy'

Gulp

var paths = {
sass: ['sass/main.scss'],
scripts: ['js/vendor/jquery-1.11.0.min.js', 'js/*.js'],
images: 'img/**/*'
};
// Styles
gulp.task('styles', function() {
    return gulp.src(paths.sass)
    .pipe(sass({errLogToConsole: true}))
    .pipe(gulp.dest('css'))
    .pipe(rename({ suffix: '.min' }))
    .pipe(minifycss())
    .pipe(gulp.dest('css'))
    .pipe(notify({ message: 'Styles task complete' }));
});
Upworks
  • 267
  • 2
  • 15
  • [gulp-sass](https://github.com/dlmanning/gulp-sass) uses [lib-sass](https://github.com/hcatlin/libsass) which is not compatible with ruby gems. Maybe try [gulp-ruby-sass](https://github.com/sindresorhus/gulp-ruby-sass)? – steveax May 15 '14 at 03:47
  • @steveax flipped to gulp-ruby-sass and I get this: [gulp] Error in plugin 'gulp-ruby-sass': Syntax error: File to import not found or unreadable: susy. – Upworks May 15 '14 at 03:52
  • What version of Sass does gulp-ruby-sass use? Susy 2 requires Sass 3.3+. – Miriam Suzanne May 16 '14 at 16:54
  • @EricMSuzanne - it uses what is installed and it currently is sass (3.3.7) on my machine. – Upworks May 16 '14 at 23:18

1 Answers1

3

Switching to gulp-ruby-sass and configuring per below solved the issue:

gulp.task('styles', function() {
   return gulp.src(paths.sass)
    .pipe(sass({require: ['susy']}))
    .pipe(gulp.dest('css'))
    .pipe(rename({ suffix: '.min' }))
    .pipe(minifycss())
    .pipe(gulp.dest('css'))
    .pipe(notify({ message: 'Styles task complete' }));
});
Upworks
  • 267
  • 2
  • 15