Achilles
Achilles

Reputation: 114

Assetic Bundle and Compass filter throw an exepsion

I am trying to use Sass/Compass with AsseticBundle on Symfony2. I followed some tutorials but nothing worked for me.

Thats my assetic configuration on config.yml

# Assetic Configuration
assetic:
    debug:          "%kernel.debug%"
    use_controller: false
    bundles:        [ FOSUserBundle,ApanaMainBundle ]
    filters:
        cssrewrite: ~
        sass:    ~
        compass: ~

And the Exception i am getting when i run "php bin/console assetic:dump --env=dev --no-debug" is :

[Assetic\Exception\FilterException]                                                                                                                                  
  An error occurred while running:                                                                                                                                     
  '/usr/bin/ruby' '/usr/local/bin/compass' 'compile' '/tmp' 
'--boring' '--images-dir' '/var/www/Apana/app/../web/images' '--config' '/tmp/assetic_compassH42xaT' '--s  
  ass-dir' '' '--css-dir' '' '/tmp/assetic_compassWicQXq.scss'                                                                                                         
  Error Output:                                                                                                                                                        
  RuntimeError on line 52 of /usr/lib/ruby/1.8/tempfile.rb: cannot generate tempfile `/tmp/.sass-cache/600d657f6ac2358f30ba6bc0ab4cd7ffb6194ced/assetic_compassWicQXq  
  .scssc20141024-7564-borx-9'                                                                                                                                          
  Run with --trace to see the full backtrace   

Upvotes: 0

Views: 241

Answers (1)

Achilles
Achilles

Reputation: 114

OK, solved it. I was using Zen-Grids and i had to mention it in the config.yml under the assetic filters.

# Assetic Configuration
assetic:
    debug:          "%kernel.debug%"
    use_controller: false
    bundles:        [ FOSUserBundle,ApanaMainBundle ]
    filters:
        cssrewrite: ~
        sass:    ~
        compass: ~
           plugins: ['zen-grids']

The exception probably means mistake in the scss syntax.

Upvotes: 1

Related Questions