0

Okay first I did this.

>grunt sass
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.

And I thought this makes sense I need to add path to ruby so I did. Then I checked version of ruby and it did return something

>ruby -v
ruby 2.2.5p319 (2016-04-26 revision 54774) [x64-mingw32]

this means I have ruby installed. Now grunt sass should work but it does not and I am getting same old message. This one:

>grunt sass
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.

UPDATE

I get following when I run grunt-sass-force:

>grunt sass --force
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
 Used --force, continuing.
'sass' is not recognized as an internal or external command,
operable program or batch file.
Warning: Exited with error code 1 Used --force, continuing.

Done, but with warnings.
user4913383
  • 171
  • 1
  • 1
  • 11
  • What happens when you use ``--force``? Have you installed ``sass``? – zhon Aug 30 '16 at 06:33
  • @zhon you mean like this: `grunt sass --force` ? I get following when I do `grunt-sass-force` >grunt sass --force 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 Used --force, continuing. 'sass' is not recognized as an internal or external command, operable program or batch file. Warning: Exited with error code 1 Used --force, continuing. Done, but with warnings. – user4913383 Aug 30 '16 at 06:49
  • Have you installed the ``sass`` gem? – zhon Aug 30 '16 at 07:04
  • @zhon Thanks for the help, I did not have `sass`. – user4913383 Aug 30 '16 at 10:45

2 Answers2

1

It appears that you need to install sass with gem install sass. Without the gem, you can't work with sass in ruby.

thesecretmaster
  • 1,950
  • 1
  • 27
  • 39
0

Sass was originally built using the ruby programming language. Running Sass on a node build system (ie., grunt, gulp, webpack) requires running both ruby and Sass and a way to connect them (ie., grunt-contrib-sass, gulp-sass, sass-loader).

Ruby plugins are called gems, installing plugins is easy:

gem install sass

On the other hand, libsass is a c implementations of Sass that do not require ruby. After installing libsass, you will need a way to connect libsass to node. You can do this with node-sass.

npm install node-sass

Finally, LESS is a competitor to Sass which runs on node and will not require ruby or libsass.

zhon
  • 1,610
  • 1
  • 22
  • 31