title: Symfony2 assetic not loading correctly
body: <p><strong>tl;dr at the bottom</strong>
  I want to set directories for Assetic files (css, js, images, whatever) to:</p>
  
  <pre><code>/web/assets/{css,js,images}/
  </code></pre>
  
  <p>That would be the main directory, used in my <code>::base.html.twig</code> file.</p>
  
  <p>Also, I will use <code>/web/assets/bootstrap/{css,js,images}/</code> to handle bootstrap files, this is actually working, I'm using <code>braincrafted/bootstrap-bundle</code> and it has an <code>output: bootstrap</code> parameter, which is good.</p>
  
  <p>And then, I'm using <code>SonataAdminBundle</code> with custom templates, I want theese templates assets to be stored into <code>/web/assets/admin/{css,js,images}/</code></p>
  
  <p>This is my config.yml file</p>
  
  <pre><code>framework:
      #esi:             ~
      translator:      ~
      secret:          "%secret%"
      router:
          resource: "%kernel.root_dir%/config/routing.yml"
          strict_requirements: ~
      form:            ~
      csrf_protection: ~
      validation:      { enable_annotations: true }
      templating:
          engines: ['twig']
          packages:
              assetic:
                  base_urls: '/assets'
              admin:
                  base_urls: '/assets/admin'
          #assets_version: SomeVersionScheme
      default_locale:  "%locale%"
      trusted_hosts:   ~
      trusted_proxies: ~
      session:
          # handler_id set to null will use default session handler from php.ini
          handler_id:  ~
      fragments:       ~
      http_method_override: true
  
  # Twig Configuration
  twig:
      debug:            "%kernel.debug%"
      strict_variables: "%kernel.debug%"
  
  # Assetic Configuration
  assetic:
      debug:          "%kernel.debug%"
      use_controller: false
      bundles:        [ "WebDificilBundle"]
      #java: /usr/bin/java
      #read_from:      %kernel.root_dir%/Resources/views/
      write_to:       %kernel.root_dir%/../web/assets/
      filters:
          cssrewrite: ~
          less:
              node: /usr/local/bin/node
              node_paths: [/usr/local/lib/node_modules]
              apply_to: "\.less$"
          #closure:
          #    jar: "%kernel.root_dir%/Resources/java/compiler.jar"
          #yui_css:
          #    jar: "%kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar"
  
  braincrafted_bootstrap:
      less_filter: less
      output_dir: bootstrap
      assets_dir: %kernel.root_dir%/../vendor/twbs/bootstrap
      jquery_path: %kernel.root_dir%/../vendor/jquery/jquery/jquery-1.10.2.js
      auto_configure:
          assetic: true
          twig: true
          knp_menu: true
          knp_paginator: true
      customize:
          variables_file: %kernel.root_dir%/../vendor/twbs/bootstrap/less/variables.less
          bootstrap_output: %kernel.root_dir%/Resources/less/bootstrap.less
          bootstrap_template: BraincraftedBootstrapBundle:Bootstrap:bootstrap.less.twig
  </code></pre>
  
  <p>And this is what I have, for example in <code>::base.html.twig</code></p>
  
  <pre><code>{% block stylesheets %}
      &lt;!-- Bootstrap --&gt;
      &lt;link href="{{ asset('assets/bootstrap/css/bootstrap.css') }}" rel="stylesheet" media="screen"&gt;
  
      {% stylesheets filter='cssrewrite' package='assetic' 'css/style.css' %}
          &lt;link rel="stylesheet" href="{{ asset_url }}" /&gt;
      {% endstylesheets %}
  
  {% endblock %}
  
  {% block javascripts %}
      &lt;script src="https://code.jquery.com/jquery.js"&gt;&lt;/script&gt;
      &lt;!-- Include all JavaScripts, compiled by Assetic --&gt;
      &lt;script src="{{ asset('assets/bootstrap/js/bootstrap.js') }}"&gt;&lt;/script&gt;
  
      &lt;script type="text/javascript"&gt;
      &lt;!--
      window.base_url = '{{ path('decision') }}';
      //--&gt;
      &lt;/script&gt;
      {% include 'BraincraftedBootstrapBundle::ie8-support.html.twig' %}
  {% endblock javascripts %}
  </code></pre>
  
  <p>This is <code>/web</code> folder by default</p>
  
  <pre><code>robhunter@debianmoi:~/public_html/dificildecision/web$ ls -atls
  total 52K
  4,0K drwxr-xr-x 3 robhunter robhunter 4,0K ene  9 14:41 ./
  4,0K drwxr-xr-x 9 robhunter robhunter 4,0K ene  9 14:14 ../
  4,0K -rw-r--r-- 1 robhunter robhunter 2,6K ene  9 12:11 .htaccess
  8,0K -rw-r--r-- 1 robhunter robhunter 5,7K ene  9 10:07 config.php
  4,0K drwxr-xr-x 2 robhunter robhunter 4,0K dic 28 01:46 fonts/
  4,0K -rw-r--r-- 1 robhunter robhunter 1,2K dic 26 22:29 app_dev.php
   12K -rw-r--r-- 1 robhunter robhunter  11K dic 26 22:29 apple-touch-icon.png
  4,0K -rw-r--r-- 1 robhunter robhunter  960 dic 26 22:29 app.php
  4,0K -rw-r--r-- 1 robhunter robhunter 1,2K dic 26 22:29 favicon.ico
  4,0K -rw-r--r-- 1 robhunter robhunter  106 dic 26 22:29 robots.txt
  </code></pre>
  
  <p>Then I run this commands
  <code>php app/console cache:clear --env=prod --no-debug | php app/console assets:install | php app/console assetic:dump</code></p>
  
  <p>And I've got this output</p>
  
  <pre><code>Dumping all dev assets.
  Debug mode is on.
  
  14:43:42 [dir+] /home/robhunter/public_html/dificildecision/app/../web/assets/bootstrap/css
  14:43:42 [file+] /home/robhunter/public_html/dificildecision/app/../web/assets/bootstrap/css/bootstrap.css
  14:43:43 [file+] /home/robhunter/public_html/dificildecision/app/../web/assets/bootstrap/css/bootstrap_bootstrap_1.css
  14:43:44 [file+] /home/robhunter/public_html/dificildecision/app/../web/assets/bootstrap/css/bootstrap_form_2.css
  14:43:45 [dir+] /home/robhunter/public_html/dificildecision/app/../web/assets/bootstrap/js
  14:43:45 [file+] /home/robhunter/public_html/dificildecision/app/../web/assets/bootstrap/js/bootstrap.js
  14:43:45 [file+] /home/robhunter/public_html/dificildecision/app/../web/assets/bootstrap/js/bootstrap_transition_1.js
  14:43:45 [file+] /home/robhunter/public_html/dificildecision/app/../web/assets/bootstrap/js/bootstrap_alert_2.js
  14:43:45 [file+] /home/robhunter/public_html/dificildecision/app/../web/assets/bootstrap/js/bootstrap_button_3.js
  14:43:45 [file+] /home/robhunter/public_html/dificildecision/app/../web/assets/bootstrap/js/bootstrap_carousel_4.js
  14:43:45 [file+] /home/robhunter/public_html/dificildecision/app/../web/assets/bootstrap/js/bootstrap_collapse_5.js
  14:43:45 [file+] /home/robhunter/public_html/dificildecision/app/../web/assets/bootstrap/js/bootstrap_dropdown_6.js
  14:43:45 [file+] /home/robhunter/public_html/dificildecision/app/../web/assets/bootstrap/js/bootstrap_modal_7.js
  14:43:45 [file+] /home/robhunter/public_html/dificildecision/app/../web/assets/bootstrap/js/bootstrap_tooltip_8.js
  14:43:45 [file+] /home/robhunter/public_html/dificildecision/app/../web/assets/bootstrap/js/bootstrap_popover_9.js
  14:43:45 [file+] /home/robhunter/public_html/dificildecision/app/../web/assets/bootstrap/js/bootstrap_scrollspy_10.js
  14:43:45 [file+] /home/robhunter/public_html/dificildecision/app/../web/assets/bootstrap/js/bootstrap_tab_11.js
  14:43:45 [file+] /home/robhunter/public_html/dificildecision/app/../web/assets/bootstrap/js/bootstrap_affix_12.js
  14:43:45 [file+] /home/robhunter/public_html/dificildecision/app/../web/assets/bootstrap/js/bootstrap_bc-bootstrap-collection_13.js
  14:43:45 [file+] /home/robhunter/public_html/dificildecision/app/../web/assets/bootstrap/js/jquery.js
  14:43:45 [file+] /home/robhunter/public_html/dificildecision/app/../web/assets/bootstrap/js/jquery_jquery-1.10.2_1.js
  14:43:45 [dir+] /home/robhunter/public_html/dificildecision/app/../web/assets/js
  14:43:45 [file+] /home/robhunter/public_html/dificildecision/app/../web/assets/js/71cfa0b.js
  14:43:45 [file+] /home/robhunter/public_html/dificildecision/app/../web/assets/js/71cfa0b_dificildecision_1.js
  14:43:45 [file+] /home/robhunter/public_html/dificildecision/app/../web/assets/js/71cfa0b_core_2.js
  14:43:45 [dir+] /home/robhunter/public_html/dificildecision/app/../web/assets/css
  14:43:45 [file+] /home/robhunter/public_html/dificildecision/app/../web/assets/css/64661ba.css
  
  
  
    [RuntimeException]                                                                                      
    The source file "/home/robhunter/public_html/dificildecision/app/../web/css/style.css" does not exist.  
  
  
  
  assetic:dump [--watch] [--force] [--period="..."] [write_to]
  </code></pre>
  
  <p>Why is Symfony2 throwing this error? It creates bootstrap stuff correctly, it creates <code>/web/assets{css,js,images} | /web/bundles | /web/assets/bootstrap/{css,js,images}/</code> so it's ok (actualy, not the <code>/web/assets/admin/</code> because I'm not using thoose twig files right now, but, there are no <code>style.css</code> file which is the main one, and it is defined in my <code>::base.html.twig</code> file inside stylesheets brakets...</p>
  
  <p><strong>tl;dr</strong> I need to know how to set correctly the assetic configuration in config.yml file, and also how to set things in twig files, to have everything working inside folders I want to, and, of course, when users go to prod env, if they see the source I don't want to see <code>whatever.com/bundles/mybundle/css/foo.css</code> I want just <code>whatever.com/assets/foo.css</code></p>