我正在尝试在Windows 8机器上安装grunt(我通常是mac)
我安装了node,ruby - 如果我使用ruby -v和node -v测试,我会得到版本号。
我已经用
安装了gruntnpm 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
答案 0 :(得分:0)
好像你已经安装了一个名为grunt的Ruby gem。运行gem uninstall grunt
,这将卸载grunt gem。 grunt -v
不是正确的命令。
如果当前工作目录中有Gruntfile.js
,请在命令行上执行以下命令,该命令将执行默认的grunt任务。
grunt