Reputation: 687
I've installed ruby and the sass gem on a Win 7 Enterprise box. I've had issues throughout the process, and had to download the gems and install them from local to avoid other issues.
gem install --local sass-3.1.19.gem
I'm trying sass --watch styles.sass:styles.css
but I get the standard sass isn't recognised error from the command line.
I'm really new to ruby so I could well have missed a step.
Thanks in advance
Upvotes: 1
Views: 17599
Reputation: 1
If you have Node installed use the node terminal instead of the windows/VSCode terminal.
Search for the Node terminal on the windows search tool placed on the right side of the windows start button.
Upvotes: 0
Reputation: 2682
After installing sass with NPM you got this:
npm install -g sass
file:///C:/Users/yourName/AppData/Roaming/npm/sass -> C:/Users/Administrador/AppData/Roaming/npm/node_modules/sass/sass.js
You can create the path. Go to environment variables - > system variables -> path -> Edith , and include file:///C:/Users/yourName/AppData/Roaming/npm/sass. Then, Accept everything. and it's done.
Upvotes: 2
Reputation: 11601
If you using Windows 10 v1607 (latest update as March 2017)
, you need to follow following steps:
System
Advanced System Settings
(left hand column)Environment variables
buttonPath
(or PATH
), then click on Edit
buttonNew
buttonC:\Ruby22-x64\bin\
(its must be path to ruby's bin folder)OK
, twiceCommand-Prompt
, now sass
is ready to watch and compile your sass files.Upvotes: 0
Reputation: 10806
In order to run commands without specifying full path, you need to have the path to the program in you PATH
variable.
So if your program is located in C:\Programs\rubygems\gem\sass
you'll need to add C:\Programs\rubygems\gem\
to PATH
.
The process of adding a folder to PATH
for the Windows command line prompt is described here.
For Windows Powershell, please check Setting Windows PowerShell path variable here on SO.
Upvotes: 5
Reputation: 687
Yes, putting the path to my ruby bin did indeed solve this.
My Computer --> right click, Properties --> Advanced system settings (left hand column) --> Environment variables --> find Path in the bottom list, highlight and edit --> include ;c:\path-to-ruby\bin at the end --> OK back out through the windows.
Thanks!
Upvotes: 0