【问题标题】:Error about compass when trying to run 'assetic:dump'尝试运行“assetic:dump”时有关指南针的错误
【发布时间】:2013-03-29 13:27:31
【问题描述】:

我在尝试运行时收到以下错误: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 同样的问题,而另一个人回答说他应该让指南针独立工作,但是..知道怎么做吗?

【问题讨论】:

    标签: symfony compass-sass


    【解决方案1】:

    只需安装 Compass:

    gem install compass
    

    与其手动安装 Compass,不如考虑使用 Bundler]1 来管理项目的依赖项。

    更新 2013-03-29

    我安装了指南针,即使我在一个月前安装并使用它,它似乎也没有安装。无论如何,错误与我在问题中提到的相同。当我运行“compass create sass test”时,没有错误。

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

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

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

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

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

    【讨论】:

    • 我安装了指南针,即使我在一个月前安装并使用它,它似乎也没有安装。无论如何,我在问题中提到的错误是一样的。当我运行'compass create sass test'时没有错误..
    • 我已经更新了我的答案,您应该检查几件事。请尝试并回复!
    【解决方案2】:

    您通常可以很容易地单独编译 compass 项目。跑吧

    compass compile /path/to/project
    

    确保您已安装 gem。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-05-05
      • 1970-01-01
      • 2022-01-08
      • 1970-01-01
      • 2020-06-09
      • 1970-01-01
      相关资源
      最近更新 更多