我继承了一个项目,但在设置sass / compass工作流程时遇到了问题。谷歌搜索没有提供任何有用的信息。
我有以下内容:
$ 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)
我尝试了各种版本的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)
我的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']);
}
我对这些版本兼容性问题感到迷茫,并且没有Ruby背景可以手动排序。有没有人遇到过类似的问题?
答案 0 :(得分:1)
我不是Ruby或Gems的专家,但看起来Breakpoint扩展是导致冲突的扩展。阅读Breakpoint gem file确认它具有以下要求:
这两个版本都比您当前安装的版本新。同样值得注意的是,这些版本都不是稳定版本,因此您必须使用--pre
标记来更新您的宝石:sudo gem install sass --pre
。