grimmus
grimmus

Reputation: 513

Cannot call sass or ruby command's in bat file

I am trying to run the sass --watch command in a bat file like so

@echo off
set path="C:\styles"
sass --watch %path%

pause

I am getting the error 'sass' is not recognized as an internal or external command etc....

I get the same issue if i try calling ruby.exe

I can run sass and ruby in a command line window and it works fine. Ruby version 1.9.3.3p362, Sass version 3.2.5 (Media Mark), Windows 7

I have tried adding 'call' before the sass command and running as administrator but no success so far.

Thanks for any help

Upvotes: 0

Views: 413

Answers (1)

Kostas Rousis
Kostas Rousis

Reputation: 6088

It appears that the executable files cannot be located.

It could have something to do with you overriding the path - try using another variable name for your temp needs!

So, either ensure that the folders of the executables are set properly in your $PATH environment variable or call the executables with their full path. For example:

"C:/MyFolder/Ruby 1.9.x/ruby.exe" ...

or

"C:/your path/of/sass.exe" -- watch ...

Upvotes: 1

Related Questions