【问题标题】:Compass error for command 'grunt server'命令“咕噜服务器”的指南针错误
【发布时间】:2014-04-28 13:15:30
【问题描述】:

我正在运行一个安装了 nodeJs、ruby、yeoman、compass 等的项目。现在我使用命令运行我的项目 >grunt server>grunt server --force

但它给了我罗盘的以下错误。

E:\CRM_workspace\CRM_from_repo\ria>grunt server --force
Running "server" task
>> The `server` task has been deprecated. Use `grunt serve` to start a server.

Running "serve" task

Running "clean:server" (clean) task
Cleaning .tmp...OK

Running "concurrent:server" (concurrent) task

Running "copy:styles" (copy) task


Done, without errors.

Running "compass:server" (compass) task
directory .tmp/styles/
       create .tmp/styles/main.css (3.069s)
    Warning: ↑ Used --force, continuing.

Done, but with warnings.

Running "autoprefixer:dist" (autoprefixer) task

Running "connect:livereload" (connect) task
Started connect web server on 127.0.0.1:9000.

Running "watch" task
Waiting...

我尝试卸载和安装 compass 和 sass。但'compass:server' 的错误仍然相同

我需要做什么?

这是我得到的详细信息错误:

E:\CRM_workspace\CRM_from_repo\ria>grunt serve
Running "serve" task

Running "clean:server" (clean) task

Running "concurrent:server" (concurrent) task

Running "copy:styles" (copy) task


Done, without errors.
    Warning: Errno::EACCES on line ["891"] of C: Permission denied - (E:/CRM_wor
kspace/CRM_from_repo/ria/.tmp/styles/main.css20140321-4456-1klow8l, E:/CRM_works
pace/CRM_from_repo/ria/.tmp/styles/main.css)
    Run with --trace to see the full backtrace Use --force to continue.

    Aborted due to warnings.


Execution Time (2014-03-21 11:21:08 UTC)
concurrent:server  6.3s  ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 100%
Total 6.3s

【问题讨论】:

标签: ruby node.js gruntjs yeoman compass-sass


【解决方案1】:

我不在 Windows 上工作,但最好的猜测是 ruby​​ 似乎没有对您的目标目录E:/CRM_workspace/CRM_from_repo/ria/.tmp/styles/main.css 的写权限,所以请检查一下。不知道windows下的权限控制,也许你应该给ruby管理员权限或者让E:大家可写。

更新:据我所知,此问题与 sass 的版本有关,因此请尝试至少将您的指南针更新为 v3.2.18

您使用命令:gem list sass 检查当前版本,并使用命令:gem update sass 进行更新,祝您好运,让我及时了解。

【讨论】:

  • @Piyusha 不好意思,windows我不太了解,可能后面的选项比较常见,给大家开启E:的写权限吧。
  • 我尝试了权限,但似乎 C: 驱动器和 E: 驱动器都具有读写权限。我的 Ruby 之前安装在 C: 盘。现在我只在 E: 驱动器上卸载并安装了所有东西。现在错误已从“EACCES on line ["891"] of C: Permission denied”变为“EACCES on line ["891"] of E: Permission denied”。这意味着我必须更改 ruby​​ 管理员权限。你知道怎么做吗?
  • Yupp...我也有同感,它一定和指南针有关。我在这个链接上尝试了答案,它奏效了。 stackoverflow.com/questions/22596760/… 非常感谢。
【解决方案2】:

这是 Compass 0.12.4 的问题。

在此处关注问题:https://github.com/chriseppstein/compass/issues/1618

您需要卸载 compass 0.12.4:gem uninstall compass,然后安装最新的工作版本:gem install compass -v 0.12.3

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-12-16
    • 2013-03-07
    • 1970-01-01
    • 2016-01-10
    • 2015-04-13
    • 2015-08-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多