php – 如何在Windows上的Symfony2中设置指南针?

我总是使用Linux操作系统,但我需要在Windows下检查其他操作.我已经设置了一个xampp包和一个symfony2框架.

config.yml:

# 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"

错误信息:

[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线

$pb->add('--sass-dir')->add('')->add('--css-dir')->add('');

$pb->add('--sass-dir')->add($tempDir)->add('--css-dir')->add($tempDir);

和yuicompressor-2.4.8.jar更改为yuicompressor-2.4.7.jar.

# 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"

相关文章

统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
前言 之前做了微信登录,所以总结一下微信授权登录并获取用户...
FastAdmin是我第一个接触的后台管理系统框架。FastAdmin是一...
之前公司需要一个内部的通讯软件,就叫我做一个。通讯软件嘛...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...