Search code examples
symfonycompass-sass

Error about compass when trying to run 'assetic:dump'


I'm getting the error below when i try to run : php app/console assetic:dump --env=dev --no-debug.

I don't know if it is related or not.

[Assetic\Exception\FilterException]                                                                                  
  An error occurred while running:                                                                                     
  '/usr/bin/ruby' '/usr/local/bin/compass' 'compile' '/tmp' '--images-dir' '/home/tirengarfio/workspace/canalones/app  
  /../web/images' '--config' '/tmp/assetic_compassYNg6JH' '--sass-dir' '' '--css-dir' '' '/tmp/assetic_compasssdSsQF.  
  scss'                                                                                                                

  Error Output:                                                                                                        
  /usr/lib/ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find compass (>= 0) amongst [sass-3.2.5] (G  
  em::LoadError)                                                                                                       
    from /usr/lib/ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'                                                    
    from /usr/lib/ruby/1.9.1/rubygems.rb:1231:in `gem'                                                                  
    from /usr/local/bin/compass:18:in `<main>'                                                                          


  Input:                                                                                                               
  @import "compass/css3";                                                                                              
  @import "compass/utilities";                                                                                         

  $naranja: #FF6600;                                                                                                   
  $blanco: #FFFFFF;                                                                                                    
  $verde_oscuro: #006666;                                                                                              
  $verde_claro: #009900;                                                                                               

  #content_center {                                                                                                    
  position: relative;                                                                                                  
      #bg {                                                                                                            
          /*background: url('/bundles/canalonesfrontend/images/bg_gris_puntos.png');*/                                 
          background: url('/bundles/canalonesfrontend/images/otis_redding.png');                                       
          width: 800px;                                                                                                
          height: 330px;                                                                                               
          position: absolute;                                                                                          
      }                                                                                                                
      .slides_container {                                                                                              
          width:570px;                                                                                                 
          height:270px;                                                                                                
          margin: 0 auto;                                                                                              
          position: absolute;                                                                                          
          z-index: 10;                                                                                                 
          div {                                                                                                        
          margin-top: 25px;                                                                                            
             width:570px;                                                                                              
             height:270px;                                                                                             
             display:block;                                                                                            
         }                                                                                                             
      }                                                                                                                
  }                                                                                                                    


  #container_info                                                                                                      
  {                                                                                                                    
     .item_info {                                                                                                      
         background: $naranja;                                                                                         
         width: 192px;                                                                                                 
         height: 250px;                                                                                                
         float: left;                                                                                                  
         margin: 15px;                                                                                                 
         padding: 10px 19px;                                                                                           
         border: 3px solid orange;                                                                                     
         @include border-radius(14px);                                                                                 
         .title {                                                                                                      
             color: $blanco;                                                                                           
             margin: 9px 0;                                                                                            
         }                                                                                                             
         .content {                                                                                                    
         }                                                                                                             
     }                                                                                                                 
  }       

NOTE: one guy is having here the same problem some time ago, and other person replies that he should make compass work as standalone, but.. any idea how?


Solution

  • Just install Compass:

    gem install compass
    

    Rather than installing Compass manually, consider using Bundler]1 for managing dependencies for your project.

    UPD 2013-03-29

    I installed compass, it seems it was not installed even if i installed and work with it one month ago. Anyway the error is the same I mention in my question.. When I run 'compass create sass test' there is no error..

    1) Please check whether Compass is correctly configured in Symfony. You can use this beautiful guide as a reference:

    http://alexandre-salome.fr/blog/Sass-Compass-Assetic-In-Ten-Minutes

    2) Please check the paths to ruby and compass executables with the which command and compare them with the paths from the beginning of the error output.

    Note that you should run which as a user running your application, for example:

    sudo -iu www-data which ruby
    sudo -iu www-data which compass