Sf 2.1.7, rvm installed, compass installed, sass like a gem, especially based Unable to load Sass / Compass after installing RVM, use with Assetic in Symfony2
parameters:
path to ruby ββbin, which you can check:
which ruby
as mentioned above. For sass and scss use a compass filter:
assetic: debug: "%kernel.debug%" use_controller: false bundles: [ FOSUserBundle, XcomplSomeBundle ] #java: /usr/bin/java filters: lessphp: file: %kernel.root_dir%/../vendor/leafo/lessphp/lessc.inc.php apply_to: "\.less$" sass: ~ compass: bin: 'pathtocompass' apply_to: "~\.(sass|scss)$~" cssrewrite: ~
And here is the warning! There is no need for 100,500 wrappers to create if you are using rvm or system ruby. Just:
$ which compass
And this is your pathtocompass.
And now:
{% block stylesheets %} {% stylesheets 'css/general.scss(or .sass)' filter='compass, cssrewrite' output='css/general.css' %} <link rel="stylesheet" type="text/css" media="screen" href={{ asset_url }} /> {% endstylesheets %} {% endblock %}
Finally, my gemlist:
~$ gem list *** LOCAL GEMS *** bigdecimal (1.1.0) bundler (1.2.4) chunky_png (1.2.7) compass (0.12.2) fssm (0.2.10) io-console (0.3) json (1.5.5) minitest (2.5.1) rake (10.0.3, 0.9.2.2) rdoc (3.9.5) rubygems-bundler (1.1.0) rvm (1.11.3.6) sass (3.2.6)
Zloypotroh
source share