简体   繁体   English

萨斯/指南针版本冲突

[英]conflicting sass / compass versions

I've inherited a project and am having problems setting up the sass/compass workflow. 我继承了一个项目,并且在设置sass / compass工作流时遇到问题。 Google search didn't yield any useful info on this. Google搜索没有产生任何有用的信息。

I've got the following: 我有以下几点:

$ cat /etc/*-release
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=15
DISTRIB_CODENAME=olivia
DISTRIB_DESCRIPTION="Linux Mint 15 Olivia"
NAME="Ubuntu"
VERSION="13.04, Raring Ringtail"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 13.04"
VERSION_ID="13.04"

$ ruby --version
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]

$ gem list

*** LOCAL GEMS ***

breakpoint (2.4.0)
celluloid (0.15.2)
chunky_png (1.2.9, 1.2.8)
color-schemer (0.2.7)
compass (0.12.2)
compass-blend-modes (0.0.2)
compass-core (1.0.0.alpha.16)
compass-normalize (1.4.3)
compass-rgbapng (0.2.1)
ffi (1.9.3)
fssm (0.2.10)
json (1.8.1)
listen (0.7.3)
multi_json (1.8.2)
rb-fsevent (0.9.3)
rb-inotify (0.9.3)
rb-kqueue (0.2.0)
sass (3.3.0.alpha.149)
sassy-maps (0.3.1)
sassy-strings (1.0.0)
singularitygs (1.1.2)
susy (1.0.9)
timers (1.1.0)
toolkit (1.3.8)
zurb-foundation (4.3.2, 4.2.3)

I've tried various versions of sass and compass but the error I get generally comes down to this: 我已经尝试过各种版本的sass和指南针,但是我得到的错误通常归结为:

$ grunt watch
Running "watch" task
Waiting...OK
>> File "sass/reset.scss" changed.

Running "compass:dist" (compass) task
Gem::LoadError on line ["1637"] of /usr/lib/ruby/1.9.1/rubygems/specification.rb: Unable to activate breakpoint-2.4.0, because sass-3.3.0.alpha.149 conflicts with sass (~> 3.3.0.rc.2), compass-0.12.2 conflicts with compass (~> 1.0.0.alpha.13)

My Gruntfile.js: 我的Gruntfile.js:

module.exports = function(grunt) {
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    compass: {
      dist: {
        options: {
          config: 'config.rb'
        }
      }
    },
    watch: {
      css: {
        files: ['sass/*.scss', 'sass/**/*.scss'],
        tasks: ['compass']
      }
    }
  });

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

  grunt.registerTask('default',['compass']);
}

I'm lost with these version compatibility issues, and have no Ruby background to go and sort them out by hand. 这些版本兼容性问题让我迷失了方向,并且没有Ruby背景可以手工解决。 Has anyone run into similar issues? 有没有人遇到类似的问题?

I'm not an expert here on Ruby or gems, but it looks like the Breakpoint extension is the one causing the conflict. 我不是Ruby或gem的专家,但是Breakpoint扩展似乎是引起冲突的扩展。 Reading the Breakpoint gem file confirms that it has the following requirements: 读取Breakpoint gem文件确认其具有以下要求:

  • Sass 3.3.0.rc.2 Sass 3.3.0.rc.2
  • Compass 1.0.0.alpha.13 指南针1.0.0.alpha.13

Both of these are newer than the versions you currently have installed. 这两个都比您当前安装的版本新。 It is also worth noting that neither of these versions are stable versions, so you'll have to update your gems using the --pre flag: sudo gem install sass --pre . 还值得注意的是,这两个版本都不是稳定版本,因此您必须使用--pre标志更新gem: sudo gem install sass --pre

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM