命令' grunt服务器'的指南针错误

时间:2014-03-21 08:58:11

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

我正在运行一个项目,我安装了nodeJs,ruby,yeoman,指南针等等。现在我用命令运行我的项目 >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...

我尝试卸载并安装指南针和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

2 个答案:

答案 0 :(得分:4)

这是Compass 0.12.4的一个问题。

请点击此处的问题:https://github.com/chriseppstein/compass/issues/1618

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

答案 1 :(得分: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进行更新,祝您好运,并让我发布。