Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error executing app/console assetic:dump (../bootstrap-sass/assets/stylesheets/bootstrap/bootstrap) #1096

Closed
alessioalx opened this issue Jul 30, 2015 · 15 comments

Comments

@alessioalx
Copy link

Hello,

I have the same error reported in this issue.

This is a part of my composer.json

"mopa/bootstrap-bundle": "dev-master",
"twbs/bootstrap": "dev-master",
"twbs/bootstrap-sass": "dev-master",

With composer show -i I have:

mopa/bootstrap-bundle                dev-master c34671a Easy integration of twitters bootstrap into symfony2
twbs/bootstrap                       dev-master d8cae01 The most popular front-end framework for developing responsive, mobile first projects on the web.
twbs/bootstrap-sass                  dev-master 8cd2bf8 bootstrap-sass is a Sass-powered version of Bootstrap, ready to drop right into your Sass powered applications.

The error generated is:

 [Assetic\Exception\FilterException]                                                                                                                                                                                   
  An error occurred while running:                                                                                                                                                                                      
  '/usr/bin/ruby' '/usr/local/bin/sass' '--load-path' '/var/www/mavitrip/vendor/mopa/bootstrap-bundle/Mopa/Bundle/BootstrapBundle/Resources/public/sass' '--scss' '--load-path' '/var/www/mavitrip/app/../web' '--cach  
  e-location' '/var/www/mavitrip/app/cache/dev' '/tmp/assetic_sassLNf5OR'                                                                                                                                               
  Error Output:                                                                                                                                                                                                         
  Error: File to import not found or unreadable: ../bootstrap-sass/assets/stylesheets/bootstrap/bootstrap.                                                                                                              
         Load paths:                                                                                                                                                                                                    
           /var/www/mavitrip/vendor/mopa/bootstrap-bundle/Mopa/Bundle/BootstrapBundle/Resources/public/sass                                                                                                             
           /var/www/mavitrip/web                                                                                                                                                                                        
          on line 26 of /tmp/assetic_sassLNf5OR                                                                                                                                                                         
    Use --trace for backtrace.                       

I saw that the bug was fixed in this issue but in this commit the change has been reverted.

Any suggestion?

Thanks,
Alessio

@alessioalx
Copy link
Author

@phiamo, @isometriks, @anacona16, any idea about this issue?

Thanks
Alessio

@anacona16
Copy link
Contributor

Hi @alessioalx, I created a new pull request fixing this bug, #1097, I don't know exactly because before it work, maybe a different version.

Thanks

@MisatoTremor
Copy link
Contributor

You should use base_sass_3.2.html.twig or if including SCSS mopabootstrapbundle-3.2.scss when using bootstrap-sass >= 3.2.

@alessioalx
Copy link
Author

I tried both versions and I have the same error.
I'm deploying with capistrano, here the output:

INFO [2264e41a] Running /usr/bin/env php app/console assetic:dump  --no-debug as deploy@www.test.com
DEBUG [2264e41a] Command: cd /var/www/test/releases/20150804040737 && ( SYMFONY_ENV=prod /usr/bin/env php app/console assetic:dump  --no-debug )
DEBUG [2264e41a]    Dumping all prod assets.
DEBUG [2264e41a]    Debug mode is off.
DEBUG [2264e41a]    
DEBUG [2264e41a]    05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/assetic/jquery.js
DEBUG [2264e41a]    05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/assetic/fontawesome4.css
DEBUG [2264e41a]    05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/fonts/FontAwesome.otf
DEBUG [2264e41a]    05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/fonts/fontawesome-webfont.eot
DEBUG [2264e41a]    05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/fonts/fontawesome-webfont.svg
DEBUG [2264e41a]    05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/fonts/fontawesome-webfont.ttf
DEBUG [2264e41a]    05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/fonts/fontawesome-webfont.woff
DEBUG [2264e41a]    05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/fonts/fontawesome-webfont.woff2
DEBUG [2264e41a]    05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/css/d8fa282.css
DEBUG [2264e41a]    05:08:32 [file+] /var/www/test/releases/20150804040737/app/../web/css/9eb40f7.css
DEBUG [2264e41a]    
DEBUG [2264e41a]    
DEBUG [2264e41a]                                                                                                                                                                                                                                                                                                                                                                            
DEBUG [2264e41a]      [Assetic\Exception\FilterException]                                                                                                                                                                                                                                                                                                                                   
DEBUG [2264e41a]      An error occurred while running:                                                                                                                                                                                                                                                                                                                                      
DEBUG [2264e41a]      '/usr/bin/ruby' '/usr/local/bin/sass' '--load-path' '/var/www/test/releases/20150804040737/vendor/mopa/bootstrap-bundle/Mopa/Bundle/BootstrapBundle/Resources/public/sass' '--scss' '--load-path' '/var/www/test/releases/20150804040737/app/../web' '--cache-location' '/var/www/test/releases/20150804040737/app/cache/prod' '/tmp/assetic_sassP32DXx'  
DEBUG [2264e41a]      Error Output:                                                                                                                                                                                                                                                                                                                                                         
DEBUG [2264e41a]      Error: File to import not found or unreadable: ../bootstrap-sass/assets/stylesheets/bootstrap/bootstrap.                                                                                                                                                                                                                                                              
DEBUG [2264e41a]             Load paths:                                                                                                                                                                                                                                                                                                                                                    
DEBUG [2264e41a]               /var/www/test/releases/20150804040737/vendor/mopa/bootstrap-bundle/Mopa/Bundle/BootstrapBundle/Resources/public/sass                                                                                                                                                                                                                                     
DEBUG [2264e41a]               /var/www/test/releases/20150804040737/web                                                                                                                                                                                                                                                                                                                
DEBUG [2264e41a]              on line 26 of /tmp/assetic_sassP32DXx                                                                                                                                                                                                                                                                                                                         
DEBUG [2264e41a]        Use --trace for backtrace.                                                                                                                                                                                                                                                                                                                                          
DEBUG [2264e41a]      Input:                                                                                                                                                                                                                                                                                                                                                                
DEBUG [2264e41a]      /*!                                                                                                                                                                                                                                                                                                                                                                   
DEBUG [2264e41a]       * MopaBootstrapBundle                                                                                                                                                                                                                                                                                                                                                
DEBUG [2264e41a]       *                                                                                                                                                                                                                                                                                                                                                                    
DEBUG [2264e41a]       * Copyright 2011 Mohrenweiser & Partner                                                                                                                                                                                                                                                                                                                              
DEBUG [2264e41a]       * Licensed under the Apache License v2.0                                                                                                                                                                                                                                                                                                                             
DEBUG [2264e41a]       * http://www.apache.org/licenses/LICENSE-2.0                                                                                                                                                                                                                                                                                                                         
DEBUG [2264e41a]       *                                                                                                                                                                                                                                                                                                                                                                    
DEBUG [2264e41a]       * Import this file in your sass files as first to be abled to access sass vars from your file                                                                                                                                                                                                                                                                        
DEBUG [2264e41a]       * OR                                                                                                                                                                                                                                                                                                                                                                 
DEBUG [2264e41a]       * Add it to the stylesheets of assetic or                                                                                                                                                                                                                                                                                                                            
DEBUG [2264e41a]       *                                                                                                                                                                                                                                                                                                                                                                    
DEBUG [2264e41a]       * Be careful when using less this way, might be most straight forward, but assetic doesnt check the included files                                                                                                                                                                                                                                                   
DEBUG [2264e41a]       * for changes, and will only regenerate the css if it detects changes in this file!                                                                                                                                                                                                                                                                                  
DEBUG [2264e41a]       *                                                                                                                                                                                                                                                                                                                                                                    
DEBUG [2264e41a]       * For development it might be easier to include all you sass files in the layout directly                                                                                                                                                                                                                                                                            
DEBUG [2264e41a]       * But then assetic will compile each sass file in a own compiler session so you cant mix in the sass style into bootstrap, which might not be OK                                                                                                                                                                                                                     
DEBUG [2264e41a]       */                                                                                                                                                                                                                                                                                                                                                                   
DEBUG [2264e41a]      // variables                                                                                                                                                                                                                                                                                                                                                          
DEBUG [2264e41a]      $icon-font-path: "/bundles/mopabootstrap/fonts/bootstrap/" !default;                                                                                                                                                                                                                                                                                                  
DEBUG [2264e41a]      // Bootstrap overrides, such as the asset-url(..) function.                                                                                                                                                                                                                                                                                                           
DEBUG [2264e41a]      @import "bootstrap_and_overrides";                                                                                                                                                                                                                                                                                                                                    
DEBUG [2264e41a]      // Main bootstrap.sass entry point                                                                                                                                                                                                                                                                                                                                    
DEBUG [2264e41a]      @import "../bootstrap-sass/assets/stylesheets/bootstrap/bootstrap";                                                                                                                                                                                                                                                                                                   
DEBUG [2264e41a]      // The Paginator less for MopaBootstrapBundle                                                                                                                                                                                                                                                                                                                         
DEBUG [2264e41a]      @import "paginator.scss";                                                                                                                                                                                                                                                                                                                                             
DEBUG [2264e41a]      // Collection support for MopaBootstrapBundle                                                                                                                                                                                                                                                                                                                         
DEBUG [2264e41a]      @import "collections.scss";                                                                                                                                                                                                                                                                                                                                           
DEBUG [2264e41a]      // FormFlow support for MopaBootstrapBundle                                                                                                                                                                                                                                                                                                                           
DEBUG [2264e41a]      @import "form_flow.scss";                                                                                                                                                                                                                                                                                                                                             
DEBUG [2264e41a]                                                                                                                                                                                                                                                                                                                                                                            
DEBUG [2264e41a]    
DEBUG [2264e41a]    
DEBUG [2264e41a]    assetic:dump [--forks FORKS] [--watch] [--force] [--period PERIOD] [--] [<write_to>]
DEBUG [2264e41a]    
DEBUG [2264e41a]    
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as deploy@www.test.com: php exit status: 1
php stdout: Dumping all prod assets.
Debug mode is off.

05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/assetic/jquery.js
05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/assetic/fontawesome4.css
05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/fonts/FontAwesome.otf
05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/fonts/fontawesome-webfont.eot
05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/fonts/fontawesome-webfont.svg
05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/fonts/fontawesome-webfont.ttf
05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/fonts/fontawesome-webfont.woff
05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/fonts/fontawesome-webfont.woff2
05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/css/d8fa282.css
05:08:32 [file+] /var/www/test/releases/20150804040737/app/../web/css/9eb40f7.css
php stderr: [Assetic\Exception\FilterException]                                                                                                                                                                                                                                                                                                                                   
  An error occurred while running:                                                                                                                                                                                                                                                                                                                                      
  '/usr/bin/ruby' '/usr/local/bin/sass' '--load-path' '/var/www/test/releases/20150804040737/vendor/mopa/bootstrap-bundle/Mopa/Bundle/BootstrapBundle/Resources/public/sass' '--scss' '--load-path' '/var/www/test/releases/20150804040737/app/../web' '--cache-location' '/var/www/test/releases/20150804040737/app/cache/prod' '/tmp/assetic_sassP32DXx'  
  Error Output:                                                                                                                                                                                                                                                                                                                                                         
  Error: File to import not found or unreadable: ../bootstrap-sass/assets/stylesheets/bootstrap/bootstrap.                                                                                                                                                                                                                                                              
         Load paths:                                                                                                                                                                                                                                                                                                                                                    
           /var/www/test/releases/20150804040737/vendor/mopa/bootstrap-bundle/Mopa/Bundle/BootstrapBundle/Resources/public/sass                                                                                                                                                                                                                                     
           /var/www/test/releases/20150804040737/web                                                                                                                                                                                                                                                                                                                
          on line 26 of /tmp/assetic_sassP32DXx                                                                                                                                                                                                                                                                                                                         
    Use --trace for backtrace.                                                                                                                                                                                                                                                                                                                                          
  Input:                                                                                                                                                                                                                                                                                                                                                                
  /*!                                                                                                                                                                                                                                                                                                                                                                   
   * MopaBootstrapBundle                                                                                                                                                                                                                                                                                                                                                
   *                                                                                                                                                                                                                                                                                                                                                                    
   * Copyright 2011 Mohrenweiser & Partner                                                                                                                                                                                                                                                                                                                              
   * Licensed under the Apache License v2.0                                                                                                                                                                                                                                                                                                                             
   * http://www.apache.org/licenses/LICENSE-2.0                                                                                                                                                                                                                                                                                                                         
   *                                                                                                                                                                                                                                                                                                                                                                    
   * Import this file in your sass files as first to be abled to access sass vars from your file                                                                                                                                                                                                                                                                        
   * OR                                                                                                                                                                                                                                                                                                                                                                 
   * Add it to the stylesheets of assetic or                                                                                                                                                                                                                                                                                                                            
   *                                                                                                                                                                                                                                                                                                                                                                    
   * Be careful when using less this way, might be most straight forward, but assetic doesnt check the included files                                                                                                                                                                                                                                                   
   * for changes, and will only regenerate the css if it detects changes in this file!                                                                                                                                                                                                                                                                                  
   *                                                                                                                                                                                                                                                                                                                                                                    
   * For development it might be easier to include all you sass files in the layout directly                                                                                                                                                                                                                                                                            
   * But then assetic will compile each sass file in a own compiler session so you cant mix in the sass style into bootstrap, which might not be OK                                                                                                                                                                                                                     
   */                                                                                                                                                                                                                                                                                                                                                                   
  // variables                                                                                                                                                                                                                                                                                                                                                          
  $icon-font-path: "/bundles/mopabootstrap/fonts/bootstrap/" !default;                                                                                                                                                                                                                                                                                                  
  // Bootstrap overrides, such as the asset-url(..) function.                                                                                                                                                                                                                                                                                                           
  @import "bootstrap_and_overrides";                                                                                                                                                                                                                                                                                                                                    
  // Main bootstrap.sass entry point                                                                                                                                                                                                                                                                                                                                    
  @import "../bootstrap-sass/assets/stylesheets/bootstrap/bootstrap";                                                                                                                                                                                                                                                                                                   
  // The Paginator less for MopaBootstrapBundle                                                                                                                                                                                                                                                                                                                         
  @import "paginator.scss";                                                                                                                                                                                                                                                                                                                                             
  // Collection support for MopaBootstrapBundle                                                                                                                                                                                                                                                                                                                         
  @import "collections.scss";                                                                                                                                                                                                                                                                                                                                           
  // FormFlow support for MopaBootstrapBundle                                                                                                                                                                                                                                                                                                                           
  @import "form_flow.scss";                                                                                                                                                                                                                                                                                                                                             



assetic:dump [--forks FORKS] [--watch] [--force] [--period PERIOD] [--] [<write_to>]

SSHKit::Command::Failed: php exit status: 1
php stdout: Dumping all prod assets.
Debug mode is off.

05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/assetic/jquery.js
05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/assetic/fontawesome4.css
05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/fonts/FontAwesome.otf
05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/fonts/fontawesome-webfont.eot
05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/fonts/fontawesome-webfont.svg
05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/fonts/fontawesome-webfont.ttf
05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/fonts/fontawesome-webfont.woff
05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/fonts/fontawesome-webfont.woff2
05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/css/d8fa282.css
05:08:32 [file+] /var/www/test/releases/20150804040737/app/../web/css/9eb40f7.css
php stderr: [Assetic\Exception\FilterException]                                                                                                                                                                                                                                                                                                                                   
  An error occurred while running:                                                                                                                                                                                                                                                                                                                                      
  '/usr/bin/ruby' '/usr/local/bin/sass' '--load-path' '/var/www/test/releases/20150804040737/vendor/mopa/bootstrap-bundle/Mopa/Bundle/BootstrapBundle/Resources/public/sass' '--scss' '--load-path' '/var/www/test/releases/20150804040737/app/../web' '--cache-location' '/var/www/test/releases/20150804040737/app/cache/prod' '/tmp/assetic_sassP32DXx'  
  Error Output:                                                                                                                                                                                                                                                                                                                                                         
  Error: File to import not found or unreadable: ../bootstrap-sass/assets/stylesheets/bootstrap/bootstrap.                                                                                                                                                                                                                                                              
         Load paths:                                                                                                                                                                                                                                                                                                                                                    
           /var/www/test/releases/20150804040737/vendor/mopa/bootstrap-bundle/Mopa/Bundle/BootstrapBundle/Resources/public/sass                                                                                                                                                                                                                                     
           /var/www/test/releases/20150804040737/web                                                                                                                                                                                                                                                                                                                
          on line 26 of /tmp/assetic_sassP32DXx                                                                                                                                                                                                                                                                                                                         
    Use --trace for backtrace.                                                                                                                                                                                                                                                                                                                                          
  Input:                                                                                                                                                                                                                                                                                                                                                                
  /*!                                                                                                                                                                                                                                                                                                                                                                   
   * MopaBootstrapBundle                                                                                                                                                                                                                                                                                                                                                
   *                                                                                                                                                                                                                                                                                                                                                                    
   * Copyright 2011 Mohrenweiser & Partner                                                                                                                                                                                                                                                                                                                              
   * Licensed under the Apache License v2.0                                                                                                                                                                                                                                                                                                                             
   * http://www.apache.org/licenses/LICENSE-2.0                                                                                                                                                                                                                                                                                                                         
   *                                                                                                                                                                                                                                                                                                                                                                    
   * Import this file in your sass files as first to be abled to access sass vars from your file                                                                                                                                                                                                                                                                        
   * OR                                                                                                                                                                                                                                                                                                                                                                 
   * Add it to the stylesheets of assetic or                                                                                                                                                                                                                                                                                                                            
   *                                                                                                                                                                                                                                                                                                                                                                    
   * Be careful when using less this way, might be most straight forward, but assetic doesnt check the included files                                                                                                                                                                                                                                                   
   * for changes, and will only regenerate the css if it detects changes in this file!                                                                                                                                                                                                                                                                                  
   *                                                                                                                                                                                                                                                                                                                                                                    
   * For development it might be easier to include all you sass files in the layout directly                                                                                                                                                                                                                                                                            
   * But then assetic will compile each sass file in a own compiler session so you cant mix in the sass style into bootstrap, which might not be OK                                                                                                                                                                                                                     
   */                                                                                                                                                                                                                                                                                                                                                                   
  // variables                                                                                                                                                                                                                                                                                                                                                          
  $icon-font-path: "/bundles/mopabootstrap/fonts/bootstrap/" !default;                                                                                                                                                                                                                                                                                                  
  // Bootstrap overrides, such as the asset-url(..) function.                                                                                                                                                                                                                                                                                                           
  @import "bootstrap_and_overrides";                                                                                                                                                                                                                                                                                                                                    
  // Main bootstrap.sass entry point                                                                                                                                                                                                                                                                                                                                    
  @import "../bootstrap-sass/assets/stylesheets/bootstrap/bootstrap";                                                                                                                                                                                                                                                                                                   
  // The Paginator less for MopaBootstrapBundle                                                                                                                                                                                                                                                                                                                         
  @import "paginator.scss";                                                                                                                                                                                                                                                                                                                                             
  // Collection support for MopaBootstrapBundle                                                                                                                                                                                                                                                                                                                         
  @import "collections.scss";                                                                                                                                                                                                                                                                                                                                           
  // FormFlow support for MopaBootstrapBundle                                                                                                                                                                                                                                                                                                                           
  @import "form_flow.scss";                                                                                                                                                                                                                                                                                                                                             



assetic:dump [--forks FORKS] [--watch] [--force] [--period PERIOD] [--] [<write_to>]

Tasks: TOP => symfony:console
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing as deploy@www.test.com: php exit status: 1
php stdout: Dumping all prod assets.
Debug mode is off.

05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/assetic/jquery.js
05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/assetic/fontawesome4.css
05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/fonts/FontAwesome.otf
05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/fonts/fontawesome-webfont.eot
05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/fonts/fontawesome-webfont.svg
05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/fonts/fontawesome-webfont.ttf
05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/fonts/fontawesome-webfont.woff
05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/fonts/fontawesome-webfont.woff2
05:08:29 [file+] /var/www/test/releases/20150804040737/app/../web/css/d8fa282.css
05:08:32 [file+] /var/www/test/releases/20150804040737/app/../web/css/9eb40f7.css
php stderr: [Assetic\Exception\FilterException]                                                                                                                                                                                                                                                                                                                                   
  An error occurred while running:                                                                                                                                                                                                                                                                                                                                      
  '/usr/bin/ruby' '/usr/local/bin/sass' '--load-path' '/var/www/test/releases/20150804040737/vendor/mopa/bootstrap-bundle/Mopa/Bundle/BootstrapBundle/Resources/public/sass' '--scss' '--load-path' '/var/www/test/releases/20150804040737/app/../web' '--cache-location' '/var/www/test/releases/20150804040737/app/cache/prod' '/tmp/assetic_sassP32DXx'  
  Error Output:                                                                                                                                                                                                                                                                                                                                                         
  Error: File to import not found or unreadable: ../bootstrap-sass/assets/stylesheets/bootstrap/bootstrap.                                                                                                                                                                                                                                                              
         Load paths:                                                                                                                                                                                                                                                                                                                                                    
           /var/www/test/releases/20150804040737/vendor/mopa/bootstrap-bundle/Mopa/Bundle/BootstrapBundle/Resources/public/sass                                                                                                                                                                                                                                     
           /var/www/test/releases/20150804040737/web                                                                                                                                                                                                                                                                                                                
          on line 26 of /tmp/assetic_sassP32DXx                                                                                                                                                                                                                                                                                                                         
    Use --trace for backtrace.                                                                                                                                                                                                                                                                                                                                          
  Input:                                                                                                                                                                                                                                                                                                                                                                
  /*!                                                                                                                                                                                                                                                                                                                                                                   
   * MopaBootstrapBundle                                                                                                                                                                                                                                                                                                                                                
   *                                                                                                                                                                                                                                                                                                                                                                    
   * Copyright 2011 Mohrenweiser & Partner                                                                                                                                                                                                                                                                                                                              
   * Licensed under the Apache License v2.0                                                                                                                                                                                                                                                                                                                             
   * http://www.apache.org/licenses/LICENSE-2.0                                                                                                                                                                                                                                                                                                                         
   *                                                                                                                                                                                                                                                                                                                                                                    
   * Import this file in your sass files as first to be abled to access sass vars from your file                                                                                                                                                                                                                                                                        
   * OR                                                                                                                                                                                                                                                                                                                                                                 
   * Add it to the stylesheets of assetic or                                                                                                                                                                                                                                                                                                                            
   *                                                                                                                                                                                                                                                                                                                                                                    
   * Be careful when using less this way, might be most straight forward, but assetic doesnt check the included files                                                                                                                                                                                                                                                   
   * for changes, and will only regenerate the css if it detects changes in this file!                                                                                                                                                                                                                                                                                  
   *                                                                                                                                                                                                                                                                                                                                                                    
   * For development it might be easier to include all you sass files in the layout directly                                                                                                                                                                                                                                                                            
   * But then assetic will compile each sass file in a own compiler session so you cant mix in the sass style into bootstrap, which might not be OK                                                                                                                                                                                                                     
   */                                                                                                                                                                                                                                                                                                                                                                   
  // variables                                                                                                                                                                                                                                                                                                                                                          
  $icon-font-path: "/bundles/mopabootstrap/fonts/bootstrap/" !default;                                                                                                                                                                                                                                                                                                  
  // Bootstrap overrides, such as the asset-url(..) function.                                                                                                                                                                                                                                                                                                           
  @import "bootstrap_and_overrides";                                                                                                                                                                                                                                                                                                                                    
  // Main bootstrap.sass entry point                                                                                                                                                                                                                                                                                                                                    
  @import "../bootstrap-sass/assets/stylesheets/bootstrap/bootstrap";                                                                                                                                                                                                                                                                                                   
  // The Paginator less for MopaBootstrapBundle                                                                                                                                                                                                                                                                                                                         
  @import "paginator.scss";                                                                                                                                                                                                                                                                                                                                             
  // Collection support for MopaBootstrapBundle                                                                                                                                                                                                                                                                                                                         
  @import "collections.scss";                                                                                                                                                                                                                                                                                                                                           
  // FormFlow support for MopaBootstrapBundle                                                                                                                                                                                                                                                                                                                           
  @import "form_flow.scss";                                                                                                                                                                                                                                                                                                                                             



assetic:dump [--forks FORKS] [--watch] [--force] [--period PERIOD] [--] [<write_to>]

I have two hypothesis:

  1. Some reference is still in cache when I deploy (even if I call the "clean cache" command).
  2. The dump tries to resolve the old path from the mopabootstrap.scss file even if it's not included in my view.

What do you think?

Alessio

@MisatoTremor
Copy link
Contributor

Could be a cache issue, you could also try to manually clear the cache by deleting the folders in app/cache.

This could also be caused by including MopaBootstrapBundle in the assetic.bundles config option in conjunction with activated compass/sass filter with apply_to: "\.(sass|scss)$". Assetic will then try to compile all SCSS files in the bundle and will fail. If this is the case your best option is to not include MopaBootstrapBundle in the assetic.bundles config option.

The error could also be cause by capistrano, but I have never used that, so I can't give any leads here.

@Alexandre-T
Copy link
Contributor

I had the same error.
@MisatoTremor : You're right. It was caused by including MopaBootstrapBundle in the assetic.bundles config option in conjunction with activated compass/sass filter with apply_to: ".(sass|scss)$". So I clean manually the cache, I executed app/console assetic:dump, and it works. But i still had an error 500 when we load homepage. In prod log file, there is :

An exception has been thrown during the compilation of a template ("You must add MopaBootstrapBundle to the assetic.bundle config to use the {% stylesheets %} tag in MopaBootstrapBundle::base_sass_3.2.html.twig

So I clean manually the cache one more time, I added MopaBootstrapBundle in the assetic.bundles and it runs. But it will be complicated to do it each time we put a new version in production.

I still have problem with fonts

No route found for "GET /fonts/glyphicons-halflings-regular.ttf

But I think this is an error of our source code. I have to investigate it.
No more fonts problem.

@quazardous
Copy link

Hi,

I've the same error here.

I've pointed on mopabootstrapbundle-3.2.scss but it keeps trying to load mopabootstrapbundle.scss and there is a mistake (?) in the last file.

// Main bootstrap.sass entry point ERROR
@import "../bootstrap-sass/assets/stylesheets/bootstrap/bootstrap";

I've added ERROR on the line to tell which file was loaded... there is a double bootstrap/bootstrap

maybe something is hardcoded ?

I've tried to copy the 3.2 scss file in my bundle but it always end up loading mopabootstrapbundle.scss...


  [Assetic\Exception\FilterException]                                                                                      
  An error occurred while running:                                                                                         
  '/usr/bin/ruby' '/usr/local/bin/compass' 'compile' '/home/david/www/youdiffuse/app/cache/dev' '--boring' '--config' '/h  
  ome/david/www/youdiffuse/app/cache/dev/assetic_compassYukVQ0' '--sass-dir' '' '--css-dir' '' '/home/david/www/youdiffus  
  e/app/cache/dev/assetic_compassPwXyA2.scss'                                                                              
  Output:                                                                                                                  
      error app/cache/dev/assetic_compassPwXyA2.scss (Line 26: File to import not found or unreadable: ../bootstrap-sass/  
  assets/stylesheets/bootstrap/bootstrap.                                                                                  
  Load paths:                                                                                                              
    /home/david/www/youdiffuse/app/cache/dev                                                                               
    /usr/local/share/gems/gems/compass-core-1.0.3/stylesheets                                                              
    /home/david/www/youdiffuse/vendor/mopa/bootstrap-bundle/Mopa/Bundle/BootstrapBundle/Resources/public/sass              
    Compass::SpriteImporter)                                                                                               
  Compilation failed in 1 files.                                                                                           
  Input:                                                                                                                   
  /*!                                                                                                                      
   * MopaBootstrapBundle                                                                                                   
   *                                                                                                                       
   * Copyright 2011 Mohrenweiser & Partner                                                                                 
   * Licensed under the Apache License v2.0                                                                                
   * http://www.apache.org/licenses/LICENSE-2.0                                                                            
   *                                                                                                                       
   * Import this file in your sass files as first to be abled to access sass vars from your file                           
   * OR                                                                                                                    
   * Add it to the stylesheets of assetic or                                                                               
   *                                                                                                                       
   * Be careful when using less this way, might be most straight forward, but assetic doesnt check the included files      
   * for changes, and will only regenerate the css if it detects changes in this file!                                     
   *                                                                                                                       
   * For development it might be easier to include all you sass files in the layout directly                               
   * But then assetic will compile each sass file in a own compiler session so you cant mix in the sass style into bootst  
  rap, which might not be OK                                                                                               
   */                                                                                                                      
  // variables                                                                                                             
  $icon-font-path: "/bundles/mopabootstrap/fonts/bootstrap/" !default;                                                     
  // Bootstrap overrides, such as the asset-url(..) function.                                                              
  @import "bootstrap_and_overrides";                                                                                       
  // Main bootstrap.sass entry point ERROR                                                                                 
  @import "../bootstrap-sass/assets/stylesheets/bootstrap/bootstrap";                                                      
  // The Paginator less for MopaBootstrapBundle                                                                            
  @import "paginator.scss";                                                                                                
  // Collection support for MopaBootstrapBundle                                                                            
  @import "collections.scss";                                                                                              
  // FormFlow support for MopaBootstrapBundle                                                                              
  @import "form_flow.scss";                                                                                                

@quazardous
Copy link

I think I've nailed it !
just suppress the mopabootstrapbundle.scss and it works.

maybe compass is just trying to compile all the scss it founds ?

@Alexandre-T
Copy link
Contributor

Yes, it is, Quazardous. I think so too. MisatoTremor said it in his last post.

@toby-griffiths
Copy link
Contributor

@quazardous how do you suppress mopabootstrapbundle.scss?

@quazardous
Copy link

@toby-griffiths just manually replace vendor/mopa/bootstrap-bundle/Mopa/Bundle/BootstrapBundle/Resources/public/sass/mopabootstrapbundle.scss by vendor/mopa/bootstrap-bundle/Mopa/Bundle/BootstrapBundle/Resources/public/sass/mopabootstrapbundle-3.2.scss
I've added a "post-update-cmd" in my composer.json to do it (yes ugly) ...

@MisatoTremor
Copy link
Contributor

@quazardous The path in mopabootstrapbundle.scss is not an error as bootstrap-sass prior to 3.2 did use that path. Therefor there are the two versions of that file.
If you somehow need to have MopaBootstrapBundle in your assetic.bundles config, a better solution would be to at least remove the apply_to from the compass filter config and add the compass filter manually where needed (Override the head_style block if using mopas base templates).

@quazardous
Copy link

Ok nice to know... have seen this somewhere in the doc. could someone provide the filter syntax ?

@toby-griffiths
Copy link
Contributor

@quazardous Thanks for the advise. That seemed to work until we have a better solution.

@MisatoTremor I need MopaBootstrapBundle in my assetic.bundles config, as I'm extending the twig form templates, however I'm not using the compass filter. Should I be?

@toby-griffiths
Copy link
Contributor

@MisatoTremor Ignore my last comment. Think I must have been tired. All's working fine with the Sass filter, now locally applied to my base template stylesheets tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants