Compass and Susy require a different version of Sass

佐手、 提交于 2020-01-12 05:46:05

问题


I am working on my website and I want to use Susy as well as Compass. I am using Grunt too. When I run my grunt task I get this error:

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.

This is my Grunt file:

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']);
}

I just don't know what to do, thanks in advance!


回答1:


There is the problem with dependencies they are incompatible: susy 2.0.0 depends on sass ~> 3.3.0 compass 0.12.3 depends on sass = 3.2.14

you can list all you gems by:

gem list

try to do this:

gem install compass --pre

This should work.



来源:https://stackoverflow.com/questions/22555984/compass-and-susy-require-a-different-version-of-sass

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!