I have a few scss files imported into a larger one using scss's @import statement. When trying to dump the assets I get the following exception:
$ php app/console assetic:dump --force --verbose
Dumping all dev assets.
Debug mode is on.
[file+] sf_project/app/../web/js/f389f05.js
sf_project/src/Theaterjobs/MainBundle/Resources/public/js/jquery-1.6.3.min.js
[file+] sf_project/app/../web/js/f389f05_jquery-1.6.3.min_1.js
sf_project/src/Theaterjobs/MainBundle/Resources/public/js/jquery-1.6.3.min.js
[file+] sf_project/app/../web/css/e9b81fe.css
sf_project/src/Theaterjobs/MainBundle/Resources/assets/css/_base.scss
sf_project/src/Theaterjobs/MainBundle/Resources/assets/css/_structure.scss
sf_project/src/Theaterjobs/MainBundle/Resources/assets/css/theaterjobs.scss
[RuntimeException]
Exception trace:
() at sf_project/vendor/assetic/src/Assetic/Filter/CompassFilter.php:278
Assetic\Filter\CompassFilter->filterLoad() at sf_project/vendor/assetic/src/Assetic/Filter/FilterCollection.php:62
Assetic\Filter\FilterCollection->filterLoad() at sf_project/vendor/assetic/src/Assetic/Asset/BaseAsset.php:83
Assetic\Asset\BaseAsset->doLoad() at sf_project/vendor/assetic/src/Assetic/Asset/FileAsset.php:57
Assetic\Asset\FileAsset->load() at sf_project/vendor/assetic/src/Assetic/Asset/BaseAsset.php:92
Assetic\Asset\BaseAsset->dump() at sf_project/vendor/assetic/src/Assetic/Asset/AssetCollection.php:97
Assetic\Asset\AssetCollection->dump() at sf_project/vendor/bundles/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php:206
Symfony\Bundle\AsseticBundle\Command\DumpCommand->doDump() at sf_project/vendor/bundles/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php:163
Symfony\Bundle\AsseticBundle\Command\DumpCommand->dumpAsset() at sf_project/vendor/bundles/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php:62
Symfony\Bundle\AsseticBundle\Command\DumpCommand->execute() at sf_project/vendor/symfony/src/Symfony/Component/Console/Command/Command.php:214
Symfony\Component\Console\Command\Command->run() at sf_project/vendor/symfony/src/Symfony/Component/Console/Application.php:194
Symfony\Component\Console\Application->doRun() at sf_project/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:75
Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at sf_project/vendor/symfony/src/Symfony/Component/Console/Application.php:118
Symfony\Component\Console\Application->run() at sf_project/app/console:16
paths shortened for readability :)
our config.yml looks like this
# Assetic Configuration
assetic:
debug: %kernel.debug%
use_controller: false
filters:
cssrewrite: ~
sass:
bin: /usr/local/bin/sass
compass:
bin: /usr/local/bin/compass
yui_js:
jar: "%kernel.root_dir%/Resources/java/yuicompressor-2.4.6.jar"
I'm including the stylesheets using
{% stylesheets filter="compass,cssrewrite" '@TheaterjobsMainBundle/Resources/assets/css/*' %}
<link rel="stylesheet" href="{{ asset_url }}" type="text/css" media="screen" charset="utf-8" />
{% endstylesheets %}
I have no idea whats going on. I'll dump you any output that might help solve this.
Thank you!
turns out it was the fact that I was including the stylesheets with '@TheaterjobsMainBundle/Resources/assets/css/*'
(with the wildcard in the path) instead of linking directly to the main scss file that imports all the scss partials using @import.
so sf was trying to compile the partials as well and failed because of unset variables.
not clearing the cache wasn't that helpful, either :)