我总是使用Linux操作系统,但我需要在Windows下检查其他操作.我已经设置了一个xampp包和一个symfony2框架.
config.yml:
@H_502_7@# Assetic Configuration assetic: debug: "%kernel.debug%" use_controller: false write_to: %kernel.root_dir%/../../html/ #bundles: [ ] #java: /usr/bin/java filters: cssrewrite : ~ sass : bin: "C:\Ruby\bin\sass" compass : bin: "C:\Ruby\bin\compass" yui_css: jar: "%kernel.root_dir%/Resources/java/yuicompressor-2.4.8.jar" yui_js: jar: "%kernel.root_dir%/Resources/java/yuicompressor-2.4.8.jar" closure: jar: "%kernel.root_dir%/Resources/java/compiler.jar"
错误信息:
@H_502_7@[exception] 500 | Internal Server Error | Assetic\Exception\FilterException [message] An error occurred while running: "C:\Ruby\bin\ruby.EXE" "C:\Ruby\bin\compass" "compile" "C:\Users\user\AppData\Local\Temp" "--boring" "--config" "C:\Users\user\AppData\Local\Temp\ass1047.tmp" "--sass-dir" "" "--css-dir" "" "C:/Users/user/AppData/Local/Temp/ass1048.tmp.sass" Error Output: Individual stylesheets must be in the sass directory.
我无法理解“单个样式表必须在sass目录中.”错误.
如何在Windows上的Symfony2中设置指南针?
版本信息:
> Windows:7
> Ruby:2.1.5
> Sass:3.4.10
>指南针:1.0.3
解决方法:
编辑:kriswallsmith / assetic / src / Assetic / Filter / CompassFilter.PHP
大约312线
@H_502_7@$pb->add('--sass-dir')->add('')->add('--css-dir')->add('');
至
@H_502_7@$pb->add('--sass-dir')->add($tempDir)->add('--css-dir')->add($tempDir);
和yuicompressor-2.4.8.jar更改为yuicompressor-2.4.7.jar.
@H_502_7@# Assetic Configuration assetic: debug: "%kernel.debug%" use_controller: false write_to: %kernel.root_dir%/../../html/ #bundles: [ ] java: C:\Program Files (x86)\Java\jre1.8.0_31\bin\java.exe ruby: C:\Ruby\bin\ruby.exe filters: cssrewrite : ~ sass : bin: C:\Ruby\bin\sass compass : bin: C:\Ruby\bin\compass yui_js: jar: "%kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar" yui_css: jar: "%kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar"
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。