Css GRUNT错误中的SASS任务:您需要安装Ruby和SASS
我尝试使用grunt contrib sass时收到错误:Css GRUNT错误中的SASS任务:您需要安装Ruby和SASS,css,sass,gruntjs,Css,Sass,Gruntjs,我尝试使用grunt contrib sass时收到错误: You need to have Ruby and Sass installed and in your PATH for this task to work. 但我确信我已经安装了Ruby和Sass。 我已经用下面的命令检查过了 ruby -v and receive 1.9.3p545 sass -v and receive 3.4.5 因此,请确保我已经安装了Ruby和Sass 但是当我使用 grunt sass 我收到了那
You need to have Ruby and Sass installed and in your PATH for this task to work.
但我确信我已经安装了Ruby和Sass。
我已经用下面的命令检查过了
ruby -v and receive 1.9.3p545
sass -v and receive 3.4.5
因此,请确保我已经安装了Ruby和Sass
但是当我使用
grunt sass
我收到了那个错误
请帮助我,我真的很感激。
对不起,我的英语不太好
这是我的package.json
{
"name": "TEST",
"version": "0.0.1",
"dependencies":
{
"grunt": "~0.4.5",
"grunt-contrib-sass": "~0.8.1"
}
}
这是Gruntile.js
module.exports = function(grunt)
{
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.initConfig
({
sass:
{
dist:
{
options:
{
style: 'compressed'
},//options
files:
{
'css/style.css': 'component/sass/style.scss'
}//files
}//dist
}//sass
})//initConfig
}//exports
运行gem安装sass,一切正常。因为新安装会修复安装路径和绑定。运行gem install sass,一切都会正常。因为新安装修复了安装路径和绑定。@Cincyan这很好,但要修复路径问题,应该进行新安装。@Cincyan这很好,但要修复路径问题,应进行新安装。请参阅如何使用grunt sass而无需全局安装Ruby和sass。请参阅如何使用grunt sass而无需全局安装Ruby和sass。