Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to resolve "You need to have Ruby and Sass installed and in your PATH for this task to work" Warning?

I am in the process of setting up a new Mac for work. I have installed Grunt & Grunt CLI globally. Then I did a npm install inside a project folder to install all dependencies.

No problems so far, but as soon as I try to run the sass:dist task, I get this warning:

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.

What I understand is that I need to have Ruby and Sass installed on a more global level for this task to run. As I am still pretty new to working with the terminal, I did a quick search to find out what PATH is - seems like its some system path (that can be changed) where important data is stored.

Does this mean I can simply do a sudo grunt install contrib-sass -g to resolve the issue? And what about Ruby – I always thought its already installed on OS X?

like image 887
Sven Avatar asked Oct 16 '22 08:10

Sven


People also ask

Does Sass use Ruby?

Ruby Sass was the original implementation of Sass, but it reached its end of life as of 26 March 2019. It's no longer supported, and Ruby Sass users should migrate to another implementation.


2 Answers

Ok I got it. I just had to install Sass using gem install sass and now everything is fine...couldn't be easier.

like image 211
Sven Avatar answered Oct 19 '22 12:10

Sven


If you're on OSX El Capitan or Yosemite on Mac there seem to be an issue installing the gem.

Try

sudo gem install -n /usr/local/bin sass

Solution was from github.

like image 91
John Richard Salt Avatar answered Oct 19 '22 12:10

John Richard Salt