Tbmluijten
Tbmluijten

Reputation: 113

Grunt sass don't have ruby and sass installed?

When I want to use my sass task with grunt I immediately get this error:

Warning: You need to have Ruby and Sass installed and in your PATH for this task to work. More info: https://github.com/gruntjs/grunt-contrib-sass Use --force to continue.

When I use my project on my Macbook I have no problems but when I use it on my iMac I get this message. I tried reinstalling sass several times by using several methods but none of them seem to work. Anyone has an idea? My iMac is pretty new so I might forgot something?

Thanks in regard!

Upvotes: 3

Views: 1240

Answers (3)

Shivani
Shivani

Reputation: 43

I was still getting error while running sudo gem install sass.

For me sudo npm install -g sass worked.

Upvotes: 0

Silviu Burcea
Silviu Burcea

Reputation: 5348

Another solution is to install sass with npm: npm install --save-dev sass

You'll need to invoke grunt from a npm script, e.g. running npm run build with below configuration in package.json:

"scripts": {
  "build": "grunt build"
}

as this allows npm to add node modules who expose a binary(like sass) before invoking your grunt script.

If you don't like this and don't mind a global, install sass like npm install -g sass

Upvotes: 1

Dan Schnau
Dan Schnau

Reputation: 1535

Solution was to install Sass with sudo gem install sass.

Upvotes: 1

Related Questions