好的,我首先这样做了。
>grunt sass
Running "sass:dist" (sass) task
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.
Aborted due to warnings.
我认为这是有道理的,我需要添加 ruby 的路径,所以我做到了。然后我检查了 ruby 的版本,它确实返回了一些东西
>ruby -v
ruby 2.2.5p319 (2016-04-26 revision 54774) [x64-mingw32]
这意味着我已经安装了 ruby。现在 grunt sass 应该可以工作,但它没有,我收到了同样的旧消息。这个:
>grunt sass
Running "sass:dist" (sass) task
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.
Aborted due to warnings.
更新
我跑步时得到以下信息grunt-sass-force
:
>grunt sass --force
Running "sass:dist" (sass) task
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
Used --force, continuing.
'sass' is not recognized as an internal or external command,
operable program or batch file.
Warning: Exited with error code 1 Used --force, continuing.
Done, but with warnings.