系统相关
首页 > 系统相关> > php – 如何在Windows上的Symfony2中设置指南针?

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"

标签:compass,php,ruby,sass,symfony
来源: https://codeday.me/bug/20190725/1528457.html