我正在使用gulp任务使用gulp-compass将我的scss编译成css。我运行的是Windows7。
我的Gulp任务:
gulp.task('styles', function() {
gulp.src('./sass/design.scss')
.pipe(compass({
config_file: './config.rb',
css: 'stylesheets',
sass: 'sass',
require: ['susy', 'breakpoint']
}))
.pipe(gulp.dest('dest/css'));
});我得到以下错误消息:
Error: You need to have Ruby and Compass installed and in your system PATH for this task to work.我已经安装了Ruby和Compass,并且在我的系统路径中,所以我看不出有什么问题。
我尝试重新安装Ruby和Compass,也没有帮助。
当我尝试在Mac系统上使用相同的任务时,它工作得很好。
将gulp-compass插件替换为gulp-ruby-sass是不可行的,因为他们有一个bug,阻止我使用我需要使用的某些sass功能。
发布于 2014-11-19 10:04:56
我没有Windows 7环境。我认为您必须将以下路径添加到系统路径中。
C:\Ruby193\bin发布于 2015-10-17 00:47:46
我遇到了这个问题,并通过从我的系统路径中删除双引号来解决它。我有一个条目:
c:\"Program Files"\Perforce;我将其更改为:
c:\Program Files\Perforce;该脚本显然不能处理双引号。
您也可以通过显式地将ruby文件夹添加到“外部Web工具”位置来解决此问题,但修复路径是更好的解决方案。
https://stackoverflow.com/questions/27000915
复制相似问题