Ruby中使用Compass时出现弃用警告

9

当我在一个项目上像往常一样尝试运行"bundle exec compass watch"时,我现在会收到以下警告:

DEPRECATION WARNING on line 87 of /home/hedy/Sites/mywebsite.fr/src/vendor/bundle/ruby/2.3.0/gems/compass-core-1.0.3/stylesheets/compass/css3/_deprecated-support.scss: #{} interpolation near operators will be simplified
in a future version of Sass. To preserve the current behavior, use quotes:

  unquote('"$moz-"#{$experimental-support-for-mozilla} "$webkit-"#{$experimental-support-for-webkit} "$opera-"#{$experimental-support-for-opera} "$microsoft-"#{$experimental-support-for-microsoft} "$khtml-"#{$experimental-support-for-khtml}')

You can use the sass-convert command to automatically fix most cases.

DEPRECATION WARNING on line 92 of /home/hedy/Sites/mywebsite.fr/src/vendor/bundle/ruby/2.3.0/gems/compass-core-1.0.3/stylesheets/compass/css3/_deprecated-support.scss: #{} interpolation near operators will be simplified
in a future version of Sass. To preserve the current behavior, use quotes:

  unquote('"$ie6-"#{$legacy-support-for-ie6} "$ie7-"#{$legacy-support-for-ie7} "$ie8-"#{$legacy-support-for-ie8}')

You can use the sass-convert command to automatically fix most cases.

所有的宝石都是最新的,但我不知道如何消除这个警告...


2
这是你可以忽略的内容。你可以尝试升级到Alpha版本,看看是否能为你解决问题(例如: gem install compass --pre)。弃用警告仅在Sass 3.4.20中出现;降级到3.4.19也将消除警告。 - cimmanon
嗯,我已经有 Sass 3.4.19 并且正在使用 Bundler。 - Hedy
如果我执行“bundle exec compass compile”,就不会出现警告!问题只会在观察期间发生... - Hedy
2个回答

4

我也遇到了这个问题。我关闭了终端并重新打开,然后尝试了 compass watch,此时它记录了修改后的sass文件,但没有写入css文件。所以我运行了 compass clean,然后再次运行 compass watch,这样它就可以正常工作了。


-2
在这种情况下,您只需要停止指南针观察命令(或重新启动cmd),然后启动sass-convert函数,它将为您解决此问题。下次只需定期使用compass watch即可。希望这可以帮助到您。

这不会有帮助,因为问题在于Compass提供的模块内部,而不是OP的代码。 - cimmanon

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接