title: How to use twitter bootstrap using assetic and less in symfony2?
body: <p>I can't get twitter bootstrap working. I know there is many tutorials and so on, but none of it works for me...</p>
  
  <p>My composer.json is:</p>
  
  <pre><code>"require":
      [...]
      "leafo/lessphp": "dev-master",
      "braincrafted/bootstrap-bundle": "dev-master",
      "twbs/bootstrap": "2.3.*"
  </code></pre>
  
  <p>My assetic configuration is:</p>
  
  <pre><code># Assetic Configuration
  assetic:
      filters:
          lessphp:
              file: %kernel.root_dir%/../vendor/leafo/lessphp/lessc.inc.php
              apply_to: "\.less$"
          cssrewrite: ~
      assets:
          bootstrap_css:
              inputs:
                  - %kernel.root_dir%/../vendor/twbs/bootstrap/less/bootstrap.less
                  - %kernel.root_dir%/../vendor/twbs/bootstrap/less/responsive.less
              filters:
                  - lessphp
                  - cssrewrite
              output: css/bootstrap.css
          bootstrap_js:
              inputs:
                  - %kernel.root_dir%/../vendor/twbs/bootstrap/js/bootstrap-transition.js
                  - %kernel.root_dir%/../vendor/twbs/bootstrap/js/bootstrap-alert.js
                  - %kernel.root_dir%/../vendor/twbs/bootstrap/js/bootstrap-button.js
                  - %kernel.root_dir%/../vendor/twbs/bootstrap/js/bootstrap-carousel.js
                  - %kernel.root_dir%/../vendor/twbs/bootstrap/js/bootstrap-collapse.js
                  - %kernel.root_dir%/../vendor/twbs/bootstrap/js/bootstrap-dropdown.js
                  - %kernel.root_dir%/../vendor/twbs/bootstrap/js/bootstrap-modal.js
                  - %kernel.root_dir%/../vendor/twbs/bootstrap/js/bootstrap-tooltip.js
                  - %kernel.root_dir%/../vendor/twbs/bootstrap/js/bootstrap-popover.js
                  - %kernel.root_dir%/../vendor/twbs/bootstrap/js/bootstrap-scrollspy.js
                  - %kernel.root_dir%/../vendor/twbs/bootstrap/js/bootstrap-tab.js
                  - %kernel.root_dir%/../vendor/twbs/bootstrap/js/bootstrap-typeahead.js
                  - %kernel.root_dir%/../vendor/twbs/bootstrap/js/bootstrap-affix.js
              output: js/bootstrap.js
  </code></pre>
  
  <p>And finally <code>::base.html.twig</code>:</p>
  
  <pre><code>{% block stylesheets %}
      &lt;link rel="stylesheet" href="{{ asset('css/bootstrap.css') }}"&gt;
  {% endblock %}
  
  {% block javascripts %}
      &lt;script src="{{ asset('js/bootstrap.js') }}"&gt;&lt;/script&gt;
  {% endblock %}
  </code></pre>
  
  <p>I'm trying include js ans css with different ways, for example:</p>
  
  <pre><code>{% stylesheets '%kernel.root_dir%/../vendor/twbs/bootstrap/less/bootstrap.less' %}
      &lt;link rel="stylesheet" href="{{ asset_url }}" /&gt;
  {% endstylesheets %}
  </code></pre>
  
  <p>or</p>
  
  <pre><code>{% stylesheets '@bootstrap_css' %}
      &lt;link rel="stylesheet" href="{{ asset_url }}" /&gt;
  {% endstylesheets %}
  </code></pre>
  
  <p>but it still not working and I'm getting 404 errors for bootstrap.css and bootstrap.js.</p>
  
  <p>Whats wrong with my config? I'm using wamp server on windows 7 64bit.</p>
  
  <p>The only way to get it working was to use cli command <code>assetic:dump</code> but I think it's not correct way to do this on dev environment.</p>