我的网站是Zend框架,并使用Assetic编译SCSS,然后再缩小它。
它奇妙的作品,当我在Ubuntu开发。
有时候,我需要在Windows(WAMP),而不是Ubuntu的开发。
我一直没能得到Assetic在Windows上运行。
我发现许多Q&至于这件事,但是没有答案似乎适用于我。 例如,我不认为我有一个config.yml文件的任何地方。
如何在Windows中使用Symfony2的Assetic +青菜工作?
如何使用SCSS滤波器Symfony2的Windows下?
下面是一个错误: Assetic\Exception\FilterException: An error occurred while running: "C:\Ruby193\bin\sass.bat" "--load-path" "C:\code\branches\signup-and-login\scss" "--scss" "--cache-location" "C:\Windows\Temp" "C:\Windows\Temp\assCCF2.tmp" Error Output: The filename, directory name, or volume label syntax is incorrect.
思考?
我想我懂了工作,但我不是100%肯定我能重现步骤来解决它。
所以,请你找出更好的细节添加一个新的答案。
我已经安装在Ruby的C:\Ruby193\
。 我需要编辑sass.bat文件中的'bin文件夹为:
@ECHO OFF
IF NOT "%~f0" == "~f0" GOTO :WinNT
@"ruby.exe" "C:/Ruby193/bin/sass" %1 %2 %3 %4 %5 %6 %7 %8 %9
GOTO :EOF
:WinNT
@"C:/Ruby193/bin/ruby.exe" "%~dpn0" %*
我读https://github.com/symfony/AsseticBundle/issues/81 。
我取代在C文件:\瓦帕\ BIN \ PHP中\ php5.3.10 \ PEAR \梨\的Symfony \元器件\过程\与Process.php https://raw.github.com/symfony/Process/master/Process。 PHP 。
我不知道这是否事项,但Assetic用正斜杠,而不是所谓的DIRECTORY_SEPARATOR PHP常量,因此:
在Assetic \筛选\萨斯\ SassFilter.php,我添加$root = str_replace('/', DIRECTORY_SEPARATOR, $root);//fix for Windows
后$root = $asset->getSourceRoot();
略低于这一点,我改变了一行$pb->add('--load-path')->add(dirname($root.DIRECTORY_SEPARATOR.$path));
。