How to resolve “You need to have Ruby and Sass installed and in your PATH for this task to work” Warning?

  • 内容
  • 评论
  • 相关

我mac上创建Grunt项目的时候使用npm install在项目文件夹下下载项目所依赖的框架出现了下面的异常

No problems so far, but as soon as I try to run the sass:dist task, I get this warning:

Warning: You need to have Ruby and Sass installed and in your PATH for

this task to work. More info:

https://github.com/gruntjs/grunt-contrib-sass Use –force

to continue.

解决方法是,要在确保Ruby安装的情况下执行

sudo gem install sass