Compass和Susy需要不同版本的Sass

Den*_*svB 4 sass gruntjs susy-compass grunt-contrib-compass

我正在我的网站上工作,我想使用Susy和Compass.我也在使用Grunt.当我运行我的grunt任务时,我收到此错误:

Denniss-MacBook-Pro:portfolio dennis$ grunt --trace
Running "compass:dev" (compass) task
Gem::LoadError on line ["1990"] of /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb: Unable to activate susy-2.1.1, because sass-3.2.17 conflicts with sass (~> 3.3.0)
Run with --trace to see the full backtrace
Warning: ? Use --force to continue.

Aborted due to warnings.
Run Code Online (Sandbox Code Playgroud)

这是我的Grunt文件:

module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),

watch: {
  options: {
    livereload: true
  },
  css: {
    files: ['_sass/*.{scss,sass}'],
    tasks: ['compass:dev']
  },
  js: {
    files: ['js/*.js'],
    tasks: ['uglify']
  }
},

compass: {
  options: {
    require: 'susy'
  },
  dev: {
    options: {
      sassDir: ['_sass'],
      cssDir: ['css'],
      environment: 'development',
    }
  },

  production: {
    options: {
      sassDir: ['_sass'],
      cssDir: ['css'],
      outputStyle: 'compressed',
      environment: 'production',
    }
  }
},

uglify: {
  all: {
    files: {
      'js/main.min.js': [
      'js/libs/*.js',
      'js/src/*.js'
      ]
    }
  }
},

connect: {
  port: 8000
}
  });

  grunt.loadNpmTasks('grunt-contrib-compass');
  grunt.loadNpmTasks('grunt-contrib-watch');
  grunt.loadNpmTasks('grunt-contrib-uglify');
  grunt.loadNpmTasks('grunt-contrib-connect');

  grunt.registerTask('default', ['compass:dev', 'uglify','connect', 'watch']);
  grunt.registerTask('production', ['compass:production', 'uglify']);
}
Run Code Online (Sandbox Code Playgroud)

我只是不知道该怎么做,提前谢谢!

小智 9

存在依赖性问题它们是不兼容的:susy 2.0.0依赖于sass~> 3.3.0指南针0.12.3取决于sass = 3.2.14

你可以列出你所有的宝石:

gem list
Run Code Online (Sandbox Code Playgroud)

试着这样做:

gem install compass --pre
Run Code Online (Sandbox Code Playgroud)

这应该工作.