1

I am trying to install Susy and Breakpoints with Bundler via Gulp. How do I do this?

In the Susy docs, it says the following:

1) Put the following in your gem file:

gem 'sass-rails', '~> 5.0.0.beta1'
gem 'susy'

2) Put the following in config/application.rb

require 'susy'

3) Then run the following in the command line

bundle install

I have done all of this. In my gulp file (see full file here), I have the following:

gulp.task('styles', function() {
    return sass('frontend/build/scss/', {style: 'expanded', bundleExec: true})
    .pipe(plumber({errorHandler: onError}))
    .pipe(autoprefixer('last 2 versions'))
    .pipe(gulp.dest('frontend/dist/css/'))
    .pipe(rename({suffix: '.min'}))
    .pipe(minifycss())
    .pipe(gulp.dest('frontend/dist/css'))
    .pipe(notify({ // Add gulpif here
           sound: "Pop"
    }));
});

But when I run gulp, it says:

[14:53:18] frontend/dist/js/main.js reloaded.

[14:53:18] frontend/dist/scripts/main.min.js reloaded.

[14:53:18] gulp-ruby-sass stderr: OptionParser::NeedlessArgument: needless argument: --sourcemap=none Use --trace for backtrace.

[14:53:18] gulp-notify: [Gulp notification]

[14:53:18] Finished 'styles' after 592 ms

[14:53:18] Starting 'default'...

[14:53:18] Finished 'default' after 6.02 μs*

The css is compiled, but it has the following error message:

Error: File to import not found or unreadable: susy.

How can I fix it, so I can run Susy and Breakpoints via Bundler with Gulp?

Thanks!

big_smile
  • 1,487
  • 4
  • 26
  • 59
  • Are you actually using Rails? – cimmanon Jan 31 '15 at 15:57
  • @cimmanon I've got all the Gems installed on my Mac. If you are using Gulp, then do you still use the gems installed? I'm not 100% clear on that bit. Thanks! – big_smile Jan 31 '15 at 16:05
  • That doesn't answer my question. If you're not using Rails, then you're not following the correct instructions. Using Sass with Rails is a little different than using Sass on its own. – cimmanon Jan 31 '15 at 17:03
  • @cimmanon So the instructions on the Susy website are for Sass with rails? How do you use it without Rails? Thanks! – big_smile Jan 31 '15 at 17:10

0 Answers0