Gulp -ruby-sass not recognized command in Windows

I first tried gulp on a Windows Server 2012 virtual machine. I am usually a Mac user, so I'm a little new to Windows and Powershell for such tools. I installed Node.js and npm (and nothing more). I created the following basic Gulpfile to compile my Sass:

Gulpfile.js

var gulp = require('gulp'), sass = require('gulp-ruby-sass'); gulp.task('styles', function() { return gulp.src('Content/sass_new/application.scss') .pipe(sass({ style: 'expanded', })) .pipe(gulp.dest('Content/css')) }); gulp.task('watch', function() { gulp.watch('Content/sass_new/*', ['styles']); }) gulp.task('default', ['styles']); 

On Windows Powershell, I run the gulp command and output the following:

 [10:02:57] Using gulpfile C:\[path to]\gulpfile.js [10:02:57] Starting 'styles'... [10:02:57] gulp-ruby-sass: 'sass' is not recognized as an internal or external command, operable program or batch file. [10:02:57] Finished 'styles' after 316 ms [10:02:57] Starting 'default'... [10:02:57] Finished 'default' after 15 μs 

Am I missing something? Do I need to install Ruby or Sass? I decided to do this, I will need a Ruby command line, and PowerShell will not have access to it. Any guidance appreciated!

+6
source share
2 answers

Yes, right, you need to install Ruby and Sass in order to get gulp-ruby-sass .

Start by downloading the Ruby installer, depending on your specifications at this address . After installation, you should have it on your system and accessible using PowerShell or a simple command line.

After that, just run the command

 gem install sass 

And you're done.

+11
source

Download and install Ruby: http://rubyinstaller.org/ set the ruby ​​location to the Path environment variable, restart the command line and run gem install sass

What is it.

0
source

Source: https://habr.com/ru/post/972782/


All Articles