使用 Windows 命令外壳无法识别 sass [英] sass not recognised using Windows command shell

查看:47
本文介绍了使用 Windows 命令外壳无法识别 sass的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在 Win 7 Enterprise 机器上安装了 ruby​​ 和 sass gem.我在整个过程中遇到了问题,不得不下载 gems 并从本地安装它们以避免其他问题.

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

我正在尝试 sass --watch styles.sass:styles.css 但我从命令行收到标准的 sass 无法识别错误.

I'm trying sass --watch styles.sass:styles.css but I get the standard sass isn't recognised error from the command line.

我对 ruby​​ 真的很陌生,所以我很可能错过了一步.

I'm really new to ruby so I could well have missed a step.

提前致谢

推荐答案

为了在不指定完整路径的情况下运行命令,您需要在 PATH 变量中包含程序的路径.

In order to run commands without specifying full path, you need to have the path to the program in you PATH variable.

因此,如果您的程序位于 C:\Programs\rubygems\gem\sass,则需要将 C:\Programs\rubygems\gem\ 添加到PATH.

So if your program is located in C:\Programs\rubygems\gem\sass you'll need to add C:\Programs\rubygems\gem\ to PATH.

为 Windows 命令行提示符添加文件夹到 PATH 的过程描述 这里.

The process of adding a folder to PATH for the Windows command line prompt is described here.

对于 Windows Powershell,请在 SO 上查看设置 Windows PowerShell 路径变量.

For Windows Powershell, please check Setting Windows PowerShell path variable here on SO.

这篇关于使用 Windows 命令外壳无法识别 sass的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆