I want to configure Foundation5 with Compass and Assetic in Symfony2, I set the foundation as stated in http://foundation.zurb.com/docs/sass.html :
npm install -g bower grunt-cli
gem install foundation
In config.ymlconfigured this way:
assetic:
debug: %kernel.debug%
use_controller: false
filters:
compass:
require: ['zurb-foundation']
apply_to: ".(scss|sass)$"
Then I imported into the base SCSS file @import "foundation";, but at startup: php app/console assetic:dumpI have the following error:
[Assetic\Exception\FilterException]
An error occurred while running:
'/usr/bin/ruby' '/usr/bin/compass' 'compile' '/tmp' '--images-dir' '/srv/www/vhosts/proj/app/../src/pro/MainB
undle/Resources/public/images' '--config' '/tmp/assetic_compass0NW1Qc' '--sass-dir' '' '--css-dir' '' '/tmp/assetic_compassT
0AFvM.scss'
Error Output:
Output:
create web/sprites/flags-s566f9ef717.png
create web/sprites/flags-s566f9ef717.png
error assetic_compassT0AFvM.scss (Line 7: File to import not found or unreadable: foundation.
Load paths:
/tmp
/usr/share/compass/frameworks/blueprint/stylesheets
/usr/share/compass/frameworks/compass/stylesheets
/srv/www/vhosts/proj/src/pro/MainBundle/Resources/public/css
/srv/www/vhosts/proj/src/pro/CompanyBundle/Resources/public/css
/srv/www/vhosts/proj/web/bundles/pro/css
Compass::SpriteImporter)
create assetic_compassT0AFvM.css
Input:
@import "base";
@import "header";
@import "global";
@import "foundation";
I also saw the update page http://foundation.zurb.com/docs/upgrading.html , where they say to change:
require "zurb-foundation"
at
add_import_path "bower_components/foundation/scss"
However, it doesn’t work, do you have any suggestions on how to configure this to work correctly?
Configuration change
If I change in config.ymlinstead of the required, I use plugins:
assetic:
debug: %kernel.debug%
use_controller: false
filters:
compass:
plugins: ['zurb-foundation']
apply_to: ".(scss|sass)$"
I get this error:
[Assetic\Exception\FilterException]
An error occurred while running:
'/usr/bin/ruby' '/usr/bin/compass' 'compile' '/tmp' '--images-dir' '/srv/www/vhosts/proj/app/../src/pro/MainB
undle/Resources/public/images' '--config' '/tmp/assetic_compass0qewOn' '--sass-dir' '' '--css-dir' '' '/tmp/assetic_compassQ
uKtrw.scss'
Error Output:
LoadError on line ["36"] of /usr/lib/ruby/1.9.1/rubygems/custom_require.rb: cannot load such file -- zurb-foundation
Run with --trace to see the full backtrace
Input:
@import "base";
@import "header";
@import "global";
@import "foundation";