转载请注明出处: http://qiudeqing.com/css3/2016/06/29/compass.html

安装

  1. 安装ruby
  2. 设置ruby环境

     gem update --system
     gem install compass
    

    gem install compass可能报错

     ERROR:  While executing gem ... (Errno::EPERM)
         Operation not permitted - /usr/bin/compass
    

    解决方法.安装时执行

     sudo gem install -n /usr/local/bin  compass
    
  3. 用compass创建项目

     compass create <myproject>