Gruntjs 如何在windows 8上安装grunt

Gruntjs 如何在windows 8上安装grunt,gruntjs,Gruntjs,我正试图在Windows8机器上安装grunt(我通常是mac) 我已经安装了node、ruby——如果我使用ruby-v和node-v进行测试,我会得到版本号 我已经安装了grunt npm install -g grunt-cli 我得到了一个npm http安装的长列表 如果然后用grunt-v测试,我得到 C:/Ruby193/lib/ruby/gems/1.9.1/gems/grunt-0.0.6/lib/grunt/project.rb:18:in `open': No such

我正试图在Windows8机器上安装grunt(我通常是mac)

我已经安装了node、ruby——如果我使用ruby-v和node-v进行测试,我会得到版本号

我已经安装了grunt

npm install -g grunt-cli
我得到了一个npm http安装的长列表

如果然后用grunt-v测试,我得到

C:/Ruby193/lib/ruby/gems/1.9.1/gems/grunt-0.0.6/lib/grunt/project.rb:18:in `open': No such file or directory - repos (Errno::ENOENT)
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/grunt-0.0.6/lib/grunt/project.rb:18:in `entries'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/grunt-0.0.6/lib/grunt/project.rb:18:in `generate_files'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/grunt-0.0.6/lib/grunt/server.rb:13:in `block in <class:Server>'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1402:in `configure'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/grunt-0.0.6/lib/grunt/server.rb:13:in `<class:Server>'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/grunt-0.0.6/lib/grunt/server.rb:2:in `<module:Grunt>'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/grunt-0.0.6/lib/grunt/server.rb:1:in `<top (required)>'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/grunt-0.0.6/bin/grunt:5:in `<top (required)>'
    from C:/Ruby193/bin/grun
C:/Ruby193/lib/ruby/gems/1.9.1/gems/grunt-0.0.6/lib/grunt/project.rb:18:“打开”:没有这样的文件或目录-repos(Errno::enoint)
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/grunt-0.0.6/lib/grunt/project.rb:18:in'entries'
来自C:/Ruby193/lib/ruby/gems/1.9.1/gems/grunt-0.0.6/lib/grunt/project.rb:18:in“generate_files”
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/grunt-0.0.6/lib/grunt/server.rb:13:in'block in'
来自C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1402:in'configure'
来自C:/Ruby193/lib/ruby/gems/1.9.1/gems/grunt-0.0.6/lib/grunt/server.rb:13:in`'
来自C:/Ruby193/lib/ruby/gems/1.9.1/gems/grunt-0.0.6/lib/grunt/server.rb:2:in`'
来自C:/Ruby193/lib/ruby/gems/1.9.1/gems/grunt-0.0.6/lib/grunt/server.rb:1:in`'
来自C:/Ruby193/lib/ruby/gems/1.9.1/gems/grunt-0.0.6/bin/grunt:5:in`'
来自C:/Ruby193/bin/grun

您似乎安装了名为grunt的Ruby gem。运行
gem uninstall grunt
,这将卸载grunt gem
grunt-v
不是正确的命令

如果当前工作目录中有
Gruntfile.js
,只需在命令行上执行以下命令,即可执行默认的grunt任务

grunt