gpt4 book ai didi

ruby - 使用 gulp 运行 compass 任务会导致 LoadError

转载 作者:数据小太阳 更新时间:2023-10-29 07:33:58 32 4
gpt4 key购买 nike

当使用 Gulp(在 OSX 上)运行罗盘任务时,我收到以下错误。我已经尝试安装特定版本的 compass 和 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过程如下:

gulp.task('sass', function() {
gulp
.src('./_src/sass/screen.scss')
.pipe(compass({
config_file: './config.rb'
}))
.pipe(gulp.dest('./assets/css'))
})

如有任何帮助或见解,我们将不胜感激。

干杯,大号

最佳答案

我用以下方法解决了这个问题:

sudo gem uninstall sass
sudo gem uninstall compass
sudo gem install sass
sudo gem install compass --pre

这安装了与最新稳定版本的 sass 一起使用的 compass 预发布版本。

关于ruby - 使用 gulp 运行 compass 任务会导致 LoadError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25006525/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com