简体   繁体   English

发脾气和发脾气

[英]grunt build and grunt serve

When running grunt build and grunt serve the following warning is coming : 当运行grunt build和grunt服务时,将出现以下警告:

Warning: You need to have Ruby and Compass installed and in your system PATH for this task to work. 
Use --force to continue.

Aborted due to warnings.

grunt version: 咕unt声版本:

grunt-cli v0.1.13
grunt v0.4.5

Operating System: 操作系统:

Windows 7

How to resolve this warning ? 如何解决此警告? Is Ruby and Compass are required or without these I can proceed ? 是需要Ruby和Compass还是没有这些我可以继续进行?

It depends on your Gruntfile, probably you have to install ruby and compass to execute your tasks. 这取决于您的Gruntfile,可能您必须安装ruby和指南针才能执行任务。

To install ruby in Windows you need to download the installer in RubyInstaller for Windows . 要在Windows中安装ruby,您需要在RubyInstaller for Windows中下载安装程序 Do not forget to open the installer as a administrator. 不要忘记以管理员身份打开安装程序。

Then, to install compass you need sass and compass. 然后,要安装指南针,您需要SASS和罗盘。 Try it: 试试吧:

gem install sass
gem install compass

It should be fix your problem. 应该可以解决您的问题。

Try to install the follwing packages with NPM 尝试使用NPM安装以下软件包

 npm install grunt-contrib-sass ruby grunt-sass sass -g

If this doesn't work try installing Ruby on your environment. 如果这样不起作用,请尝试在您的环境中安装Ruby。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM