Compass in Symfony 2 assetic Filter Exception Compass in Symfony 2 assetic Filter Exception ruby ruby

Compass in Symfony 2 assetic Filter Exception


I don`t want to discourage you, but using Windows and Ruby this is the worse combo ever, (node also, node_module with long tree subdirectories, making Windows to have a limit of 256charaters and will show an error by installing the packages). My point is like an alternative to move your project to Virtual Machine similar with your server configuration. (VirtualBox and Vagrant)

Linux is more friendly with Ruby (it has support for him) and has symlinks and long path names;

for tinkering: https://symfony.com/doc/2.8/setup/homestead.html

Perhaps will be help also this old link:How to use SCSS filter in Symfony2 under Windows?


It's highly likely this is something you've already tried / noticed, but just in case:

The error seems more like the ruby interpreter is dying, rather than it choking on your scss / twig. Which makes some degree of sense since ruby doesn't expect a .BAT script to be utilized.

Generally just 'compass' is used, not 'compass.BAT', which usually just calls ruby with 'compass'.

I.e.

"C:\Ruby21-x64\bin\ruby.EXE" "C:\Ruby21-x64\bin\compass.BAT" "compile" "C:\ Users\tommie\AppData\Local\Temp" "--boring" "--config" "C:\Users\tommie\App Data\Local\Temp\ass4325.tmp" "--sass-dir" "" "--css-dir" "" "C:/Users/tommi e/AppData/Local/Temp/ass4326.tmp.scss"

Would normally be

"C:\Ruby21-x64\bin\ruby.EXE" "C:\Ruby21-x64\bin\compass" "compile" "C:\ Users\tommie\AppData\Local\Temp" "--boring" "--config" "C:\Users\tommie\App Data\Local\Temp\ass4325.tmp" "--sass-dir" "" "--css-dir" "" "C:/Users/tommi e/AppData/Local/Temp/ass4326.tmp.scss"

Essentially, set the compass.bin path to not have the .bat in it, and you'll probably be fine. This is generally in the assetic.filters.compass.bin in your config.yml

See also https://github.com/symfony/AsseticBundle/issues/158

This also reveals special characters aren't well liked, not sure how well it likes spaces in dirnames. Those might also contribute to choking if it still doesn't work without the .bat