当使用Gulp运行罗盘任务时(在OSX上),我会收到以下错误。我尝试过安装特定版本的罗盘和sass (以不同的顺序),没有任何显著的效果。
[17:25:46] LoadError on line ["54"] of /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb: cannot load such file -- compass/import-once/activate
Run with --trace to see the full backtrace
events.js:72
throw er; // Unhandled 'error' event
^
Error: Compass failed
at Transform.<anonymous> (/Users/liamegan/Projects/WTC/nintendo.wethecollective.com/html/Websites/Kids/web/node_modules/gulp-compass/index.js:37:28)
at ChildProcess.<anonymous> (/Users/liamegan/Projects/WTC/nintendo.wethecollective.com/html/Websites/Kids/web/node_modules/gulp-compass/lib/compass.js:136:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Socket.<anonymous> (child_process.js:956:11)
at Socket.EventEmitter.emit (events.js:95:17)
at Pipe.close (net.js:465:12)我的指南针版本是0.12.7,我的sass版本是3.3.13,但是我也尝试过使用sass 3.2.19。
我的sass吞咽过程如下:
gulp.task('sass', function() {
gulp
.src('./_src/sass/screen.scss')
.pipe(compass({
config_file: './config.rb'
}))
.pipe(gulp.dest('./assets/css'))
})任何帮助或洞察力都将不胜感激。
干杯,我
发布于 2014-07-29 18:22:51
我用以下方法修正了这个问题:
sudo gem uninstall sass
sudo gem uninstall compass
sudo gem install sass
sudo gem install compass --pre这安装了预先发行版的罗盘,它适用于最新的稳定版本的sass。
https://stackoverflow.com/questions/25006525
复制相似问题