问题
I'm working with gulp, I'm trying to install packages and the only way to install gulp on windows is to type npm install -g gulp@3.8.7 because new versions print me in the console some errors about the v8flags package. So I'm trying to compile sass through Gulp. I've a gulpfile.js:
'use strict';
var gulp = require('gulp');
var sass = require('gulp-ruby-sass');
gulp.task('sass', function() {
return sass('css/main.scss')
.on('error', function (err) {
console.error('Error', err.message);
})
.pipe(gulp.dest('css/main.css'));
});
But Everytime I type "gulp sass" the console prints:
Error Missing the SASS executable. Please install and make it available on your PATH.
I have included the directory of my ruby bin in the PATH var (system variables within Enviroment variables).
I'm on Windows 8.1
ruby -v
ruby 1.9.3p545 (2014-02-24) [i386-mingw32]
node -v
v0.10.29
npm -v
1.4.14
sass -v
Sass 3.4.8 (Selective Steve)
回答1:
I had the same problem. I did
sudo gem install sass
and that added the sass executable to my path.
来源:https://stackoverflow.com/questions/27197701/gulp-missing-the-sass-executable