1
votes

I'm just starting to use ruby, gulp and node...

I installed ruby for windows, then I installed the sass, then I install the node, gulp and the plugin gulp-ruby-sass

I have this in my gulpfile.js

var gulp = require('gulp');
var sass = require('gulp-ruby-sass');


gulp.task('styles', function() {
    return sass('sass/**/*.scss', { style: 'compressed' })
        .pipe(gulp.dest('./css/'));
});

when i Try to run the gulp styles I got this error

C:\Users\angel\project.test>gulp styles
[14:29:02] Using gulpfile ~\project.test\gulpfile.js
[14:29:02] Starting 'styles'...

events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: Gem cmd is not installed.
2
If this is a rails project make sure you have run bundle install. Also if you are using Rails you can consider using the built in assets keychain. Gulp is really powerful but is a bit of a swiss-army-chainsaw-lightsaber while Sprockets (the build in rails asset pipeline) usually just works. - max

2 Answers

1
votes

I guess something went wrong while installing the Sass gem. Try reinstall Sass.

gem uninstall sass
gem install sass
0
votes

Make sure that your System Environment Path variable includes:

C:\Windows\System32

Obviously, Ruby bin directory should be included as well. For example:

C:\Ruby22\bin

I am not affiliated with RapidEE but I find their app is great for editing Environment Variables.