You need to have Ruby and Sass installed and in your PATH for this task to work

 

I was trying to compile some Sass files using Grunt when I get this error:

$ grunt
Running "sass:dist" (sass) task
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.

Aborted due to warnings.

Grunt can’t found Ruby and Sass in the path.

To resolve this problem, I have to install Ruby and Sass

$ sudo apt-get update
$ sudo apt-get install ruby sass

If you want the latest Sass version in your system, execute instead this commands

$ sudo apt-get update
$ gem install sass
$ export PATH=$PATH:/usr/local/bin/

If you want that that this change becomes permanent, you have to write the last line in your ~/.bashrc file, so when you start your session this path will be loaded in your $PATH environment variable.

2 comments

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.