简体   繁体   English

警告:运行“指南针:服务器”(指南针)任务

[英]Warning: Running “compass:server” (compass) task

D:\Projects\mallspk>grunt serve
Running "serve" task

Running "clean:server" (clean) task
>> 0 paths cleaned.

Running "wiredep:app" (wiredep) task

Running "wiredep:test" (wiredep) task

Running "wiredep:sass" (wiredep) task

Running "concurrent:server" (concurrent) task
    Warning: Running "compass:server" (compass) task
Warning: Command failed: 'compass.bat' is not recognized as an internal or exter
nal command,
    operable program or batch file.
     Use --force to continue.

I have install the Yo angular and runs the followings commands: 我安装了Yo angular并运行以下命令:

npm install grunt --save-dev
npm install -g grunt-contrib-compass 
npm install -g compass
npm install
bower install
npm install  grunt-google-cdn

and when i run the command grunt serve i have got this error. 当我运行命令grunt serve时,我遇到了这个错误。 i have latest node and npm install with latest grunt and yo. 我有最新的节点和npm安装与最新的grunt和哟。

I had ruby install @squiroid. 我有ruby安装@squiroid。 I forget to run gem install compass . 我忘了运行gem install compass That worked for me. 这对我有用。

I've the same problem in ubuntu and I did this to solve my problem : 我在ubuntu中遇到了同样的问题,我这样做是为了解决我的问题:

  1. sudo apt-get install ruby
  2. sudo apt-get install ruby-compass
  3. sudo gem install compass

after that grunt serve works 在那个grunt serve工作之后

I had the same problem I installed compass gem on my desktop and it is resolved. 我有同样的问题我在我的桌面上安装指南针宝石,它已解决。

If you're on OS X or Linux you probably already have Ruby installed; 如果你在OS X或Linux上,你可能已经安装了Ruby; test with ruby -v in your terminal. 在你的终端用ruby -v测试。 When you've confirmed you have Ruby installed, run gem update --system && gem install compass to install Compass and Sass. 当您确认已安装Ruby时,请运行gem update --system && gem install compass以安装Compass和Sass。

For windows you can download ruby and then install compass. 对于Windows,您可以下载ruby然后安装指南针。

Hope it helps :) 希望能帮助到你 :)

I searched and searched ... until finally I got the answer to this problem. 我搜索和搜索......直到最后我得到了这个问题的答案。
In my case it happened when I was creating a new angularjs application with yeomen. 在我的情况下,它发生在我用yeomen创建一个新的angularjs应用程序时。

This answer is specific to windows users 这个答案特定于Windows用户

Step 1: Install ruby http://rubyinstaller.org/downloads/ 第1步:安装ruby http://rubyinstaller.org/downloads/

Step 2 : download rubygems Link : https://rubygems.org/rubygems/rubygems-2.6.8.zip 第2步:下载rubygems链接: https ://rubygems.org/rubygems/rubygems-2.6.8.zip

Step 3 : unzip rubygems-2.6.8.zip 第3步:解压缩rubygems-2.6.8.zip

Step 4 : open powershell (terminal/command line) to the rubygems-2.6.8 folder path.(location of the folder eg. c:\\folder\\folder) 步骤4:打开powershell(终端/命令行)到rubygems-2.6.8文件夹路径。(文件夹的位置,例如.c:\\ folder \\ folder)

Step 5 : in the powershell terminal run these commands 步骤5:在powershell终端中运行这些命令

> ruby setup.rb

> gem install compass

enjoy! 请享用!

I had the same problem 我有同样的问题

"yo angular" with sass option will use the compass, which is a ruby gem. 带有sass选项的“yo angular”将使用指南针,这是一颗红宝石。

Install the ruby, and the compass 安装红宝石和指南针

In windows system we also need to set the path of ruby. 在windows系统中,我们还需要设置ruby的路径。 Add the ruby/bin to path 将ruby / bin添加到路径中

Then "grunt serve" works! 然后“咕噜咕噜”的作品!

I have those problems too, I found a temporary fix by setting the source maps to false. 我也有这些问题,我通过将源映射设置为false来找到临时修复。

server: {
        options: {
          sourcemap: false <--
        }
      }

after that, it works like charm. 之后,它就像魅力一样。

From the document of grunt-contrib-compass , that says: grunt-contrib-compass的文件中可以看出:

"This task requires you to have Ruby, Sass, and Compass >=1.0.1 installed" and "When you've confirmed you have Ruby installed, run gem update --system && gem install compass to install Compass and Sass." “此任务要求您安装Ruby,Sass和Compass> = 1.0.1”和“当您确认已安装Ruby时,运行gem update --system && gem install compass以安装Compass和Sass。”

I followed this instruction and fixed the warning. 我按照这条指令修正了警告。

如果你在使用node + express + Angluar时对Ruby有同样奇怪的感觉,请运行“yo angular xyz”,但使用gulp而不是grunt。

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

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