【问题标题】:Running a compass task with gulp results in a LoadError使用 gulp 运行指南针任务会导致 LoadError
【发布时间】:2014-09-20 07:21:25
【问题描述】:

使用 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'))
})

任何帮助或见解将不胜感激。

干杯, 升

【问题讨论】:

    标签: ruby macos sass gulp


    【解决方案1】:

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

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-05-05
      • 1970-01-01
      • 2013-08-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多