gpt4 book ai didi

symfony - 在 Symfony 2.3.0-DEV (Windows) 中配置 Assetic、Sass、Compass

转载 作者:行者123 更新时间:2023-12-02 05:09:50 39 4
gpt4 key购买 nike

我在 C:\Ruby200-x64 中安装了 Ruby,PATH 设置为 C:\Ruby200-x64\bin 并运行:

gem update --system
gem install sass
gem install compass

然后我在app/config/config.yml中配置了Assetic:

ruby:           C:\Ruby200-x64\bin\ruby.exe
sass: C:\Ruby200-x64\bin\sass.bat
filters:
compass:
bin: C:\Ruby200-x64\bin\compass.bat

app/Resources/views/base.html.twig 中,我添加了样式表 block :

{% stylesheets
'css/main.scss' filter="compass" %}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}

scss 文件指向 /web/css/main.scss 用于在产品中进行测试我会使用 bundles/bundlename/... 路径。

然后,当我尝试安装和转储 Assets 时:

php app/console assets:install
php app/console assetic:dump

我在以 .bat 结束路径时遇到此错误:

  [Assetic\Exception\FilterException]
An error occurred while running:
"C:\Ruby200-x64\bin\ruby.EXE" "C:\Ruby200-x64\bin\compass.bat" "compile" "C:\Users\Jes·s\AppData\Local\Temp" "--config" "C:\Users\Jes·s\AppData\Local\Temp\assC7D6.tmp" "--sass-dir" "" "--css-dir" "" "C:/Users/Jes·s/AppData/Local/Temp/assC7D7.tmp.scss"

Error Output:
C:/Ruby200-x64/bin/compass.bat:1: syntax error, unexpected tCONSTANT, expecting end-of-input

当不使用 .bat 扩展名时:

[Assetic\Exception\FilterException]
An error occurred while running:
"C:\Ruby200-x64\bin\ruby.exe" "C:\Ruby200-x64\bin\compass" "compile" "C:\Users\Jes·s\AppData\Local\Temp" "--config" "C:\Users\Jes·s\AppData\Local\Temp\ass52DB.tmp" "--sass-dir" "" "--css-dir" "" "C:/Users/Jes·s/AppData/Local/Temp/ass52DC.tmp.scss"

Error Output:
Configuration file, C:\Users\Jes·s\AppData\Local\Temp\ass52DB.tmp, not found or not readable.

我看到了这些(和其他):

最佳答案

没有 .bat 的版本是正确的,但是看起来像“Jes·s”文件夹名称导致了问题(应该有带有重音符号的 u?)。

关于symfony - 在 Symfony 2.3.0-DEV (Windows) 中配置 Assetic、Sass、Compass,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15677978/

39 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com