Grunt need compass installed in system PATH Warning

user2539369 picture user2539369 · Feb 18, 2014 · Viewed 28.4k times · Source

I want to install Yeoman, Grunt and bower to my node project.

I made a node project in Eclipse (using the nodeclipse plugin) and navigated to the project folder (which is H:\Eclipse Workspace\YoTest) in cmd and typed in:

npm install yo -g

npm install generator-webapp -g

yo webapp

selected: Sass (with compass), in cmd

And then typed:

grunt serve

to run the webapp.

I get the following error message:

Done, without errors.
    Warning: Running "compass:server" (compass) task
Warnin: 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. Use --force to continue.

    Aborted due to warnings.

How do I fix this so that I can run my node project with grunt?

PS: I'm not sure if it has anything to do with the problem, but I also get the following errors on line 1-27 in my package.json:

Multiple markers at this line
    - strings must use singlequote
    - strings must use singlequote

This is my package.json

{
  "name": "yotest2",
  "version": "0.0.0",
  "dependencies": {},
  "devDependencies": {
    "grunt": "~0.4.1",
    "grunt-contrib-copy": "~0.4.1",
    "grunt-contrib-concat": "~0.3.0",
    "grunt-contrib-uglify": "~0.2.0",
    "grunt-contrib-compass": "~0.7.0",
    "grunt-contrib-jshint": "~0.7.0",
    "grunt-contrib-cssmin": "~0.7.0",
    "grunt-contrib-connect": "~0.5.0",
    "grunt-contrib-clean": "~0.5.0",
    "grunt-contrib-htmlmin": "~0.1.3",
    "grunt-bower-install": "~0.7.0",
    "grunt-contrib-imagemin": "~0.2.0",
    "grunt-contrib-watch": "~0.5.2",
    "grunt-rev": "~0.1.0",
    "grunt-autoprefixer": "~0.5.0",
    "grunt-usemin": "~2.0.0",
    "grunt-mocha": "~0.4.0",
    "grunt-modernizr": "~0.4.0",
    "grunt-newer": "~0.6.0",
    "grunt-svgmin": "~0.2.0",
    "grunt-concurrent": "~0.4.0",
    "load-grunt-tasks": "~0.2.0",
    "time-grunt": "~0.2.0",
    "jshint-stylish": "~0.1.3"
  },
  "engines": {
    "node": ">=0.8.0"
  }
}

I'm on Windows.

Answer

Eric picture Eric · Feb 18, 2014

The warning seems to say it all.

  1. If you're on OS X or Linux you probably already have Ruby installed; test with ruby -v in your terminal. When you've confirmed you have Ruby installed, run gem update --system && gem install compass to install Compass and Sass.

  2. If that doesn't help, then install the grunt-contrib-compass package with the instructions at https://github.com/gruntjs/grunt-contrib-compass