سؤال

I can't figure out why my TravisCI build keep failing (on node 0.10) while compiling my SASS files.

I keep receiving the same error:

Running "concurrent:test" (concurrent) task
Warning: Running "compass:dist" (compass) task
Warning: You need to have Ruby and Compass installed and in your system PATH for this task to work. More info: https://github.com/gruntjs/grunt-contrib-compass Use --force to continue.

Aborted due to warnings.

But I've installed both sass and grunt-contrib-sass, as you can see by my .travis.yml

language: node_js                                                                                                                              

before_install:                                                                                                                                
  - gem install sass                                                                                                                           

node_js:                                                                                                                                       
  - '0.8'                                                                                                                                      
  - '0.10'                                                                                                                                     

before_script:                                                                                                                                 
  - 'npm install -g bower grunt-cli karma'                                                                                                     
  - 'bower install'                                                                                                                            

script: grunt    

and my (excerpt) of package.json

"grunt-bower-install": "~1.0.0",                                                                                                          
"grunt-concurrent": "~0.5.0",                                                                                                              
"grunt-contrib-clean": "~0.5.0",                                                                                                           
"grunt-contrib-compass": "~0.7.2",                                                                                                         
"grunt-contrib-concat": "~0.3.0",                                                                                                          
"grunt-contrib-connect": "~0.5.0",                                                                                                         
"grunt-contrib-copy": "~0.4.1",            

Anyone knows what could be going on?

Link to my Travis build: https://travis-ci.org/dmatteo/ng-bootstrap-pure/builds

p.s. of course my locale grunt is testing and building flawlessly

هل كانت مفيدة؟

المحلول

It looks like the installation of sass wasn't enough, and compass was needed to. Moreover, I needed to specify that a GUI was needed, and this is done in the first two lines of before_install

So, this is the working .travis.yml:

language: node_js

before_install:
  - "export DISPLAY=:99.0"
  - "sh -e /etc/init.d/xvfb start"
  - gem install sass
  - gem install compass

node_js:
  - '0.10'
  - '0.11'

before_script:
  - 'npm install -g bower grunt-cli karma'
  - 'bower install'

script: grunt
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top