Windows, compass, and ruby path #158

Misiur opened this Issue Jan 22, 2013 · 5 comments

4 participants


Hello. I ran into problem using windows and compass filter. After googling I've found kriswallsmith/assetic#299 . When custom ruby path was added the problem occured. I tried to undestand why. As we can see all the ruby .bat files (not only compass) are just wrappers to execute script with ruby.

In my opinion the problem lies here - - this is more of a logic flaw than a scripting error. I suggest in case of windows we shouldn't treat ruby scripts as executables, and therefore not using ExecutableFinder.

Sorry if this is not constructive, I'm just sharing my thoughts.


Hi, I have a problem with Compass filter in Windows. When I open the generated .css file it shows an error:

"Error Output:
C:/Ruby193/bin/compass.BAT:1: syntax error, unexpected tCONSTANT, expecting $end"

I have read the "kriswallsmith/assetic#299" solutions but the problem hasn't resolved.
Do you know any other solution? Thanks a lot.


As you can see, currently the ruby.exe loads your bat file, which only purpose is to load script file in ruby interpreter. One solution is to manually force path to compass, using parameters in config.yml:

    assetic.filter.compass.bin: C:/Ruby193/bin/compass

Thank you :)


EDIT: Effectively, this issue was resolved by removing the .bat extension. And the problems I got were due to symbols in my username folder. Nothing that assetic or ruby should worry about.

I also have this issue in Symfony 2.3.0-DEV, trying to install compass. PATH variable is set to include C:\Ruby200-x64\bin and I'm under Windows 8.

This is an scerpt of my app/config/config.yml with the relevant lines:

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

Using .bat paths I got the following error, and kriswallsmith/assetic#299 do not fix it.

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" "--con
fig" "C:\Users\Jes·s\AppData\Local\Temp\assFB1B.tmp" "--sass-dir" "" "--css-dir" "" "C:/Users/Jes·s/AppData/Local/T

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

Without .bat in the paths I got:

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/

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

More detailed explanation of my problem:


for me, it was because of the configuration:

        formatter: Leafo\ScssPhp\Formatter\Compressed


    scssphp: ~

everything else was default (bin paths)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment