6

I'm trying out gulp for the first time on a Windows Server 2012 VM. I'm normally a Mac user, so I'm a bit new to Windows & Powershell for dev tools like this. I installed Node.js & npm (and nothing else). 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']);

In Windows Powershell, I run the gulp command, and it outputs 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 here? Do I need to install Ruby or Sass? I thought to do that, I'd need a Ruby command prompt and PowerShell wouldn't have access to it. Any guidance is appreciated!

Marcelo Somers
  • 209
  • 2
  • 12

2 Answers2

11

Yes that's right, you need to install Ruby and Sass to get gulp-ruby-sass working.

Begin by download the Ruby installer depending on your specs at this address. Once installed you supposed to have it on your system and accessible by PowerShell or the simple command line.

After, just run the command

gem install sass

And you're done.

Preview
  • 35,317
  • 10
  • 92
  • 112
0

Download and Install Ruby : http://rubyinstaller.org/ set ruby location to Path Environment Variable restart the command prompt and run gem install sass

That's it.

Snopzer
  • 1,602
  • 19
  • 31
  • 1
    While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/low-quality-posts/12237787) – Vini.g.fer May 04 '16 at 15:10
  • Yes Vini.g.fer, you are right, i just provided the link to download the ruby. Thanks for information – Snopzer May 05 '16 at 06:27