尝试运行'assetic:dump'时罗盘错误

时间:2013-03-28 17:36:49

标签: symfony compass-sass

当我尝试运行时,我收到以下错误:php app/console assetic:dump --env=dev --no-debug

我不知道它是否相关。

[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 {                                                                                                    
         }                                                                                                             
     }                                                                                                                 
  }       

注意:一个人前一段时间遇到here同样的问题,其他人回复说他应该让指南针独立工作,但是......任何想法如何?

2 个答案:

答案 0 :(得分:0)

只需安装指南针:

gem install compass

不要手动安装Compass,而应考虑使用Bundler] 1来管理项目的依赖项。

UPD 2013-03-29

  

我安装了罗盘,即使我在一个月前安装并使用它也似乎没有安装。无论如何,错误与我在问题中提到的相同。当我运行'指南针创建sass测试'时,没有错误..

1)请检查Symfony中是否正确配置了Compass。您可以使用这个美丽的指南作为参考:

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

2)请使用ruby命令检查compasswhich可执行文件的路径,并将它们与错误输出开头的路径进行比较。

请注意,您应该以运行应用程序的用户身份运行which,例如:

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

答案 1 :(得分:0)

您通常可以非常轻松地单独编译指南针项目。跑吧

compass compile /path/to/project

确保安装了gem。

相关问题