I try to configure my Symfony2 project with compass and Assetic on Ubuntu 12.04 (give up to run this project with compass and Assetic on Windows XP).
I configured compass and it works fine when I start my project in dev environment, though in prod I have wrong asset_url paths to my css output files from compass filter.
Here is my config.yml assetic section:
# Assetic Configuration
assetic:
debug: %kernel.debug%
use_controller: false
#bundles: [ ]
#java: /usr/bin/java
filters:
cssrewrite: ~
sass:
bin: /usr/local/bin/sass
apply_to: "\.scss$"
#bin: C:/Ruby200/bin/sass this is for Windows not working though
compass:
images_dir: %kernel.root_dir%/../web/images
http_path: /images
#bin: C:/Ruby200/bin/compass.bat this is for Windows not working though
bin: /usr/local/bin/compass
closure:
jar: %kernel.root_dir%/Resources/java/compiler.jar
yui_css:
jar: %kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar
I include assetic filter in app/Resources/views/base.html.twig
{% stylesheets filter="compass" "@PortalSlubnyMainBundle/Resources/public/css/settings.scss"%}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
When I run my project through app_dev.php I got properly formatted asset_url
which look like this: /app_dev.php/css/6262784_settings_1.css
In prod environment I got wrong urls sth like this: /css/6262784.css (404 not found error)
I clear the cache for prod and dev and nothing has changed.