我尝试使用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我收到了这个错误。
请帮助我,我真的很感激。对不起,我的英语不太好。
这是我的package.json
{
"name": "TEST",
"version": "0.0.1",
"dependencies":
{
"grunt": "~0.4.5",
"grunt-contrib-sass": "~0.8.1"
}
}这是gruntfile.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发布于 2015-02-03 17:49:29
运行gem install sass,一切都会很好。因为全新安装会修复安装路径和绑定。
https://stackoverflow.com/questions/26252139
复制相似问题