I have a grunt configuration which currently have watch and compass modules configured. But when i update any scss file, I am getting message:
Running "compass:dist" (compass) task
and nothing happens from that point. Files will not be compiled. It seems like very slow build. I waited for 10 mins and nothing happens. No errors.
If run with -v -d will get: Running "compass" task [D] Task source: /home/[mypath]/node_modules/grunt-contrib-compass/tasks/compass.js
Running "compass:dist" (compass) task [D] Task source: /home/[mypath]/node_modules/grunt-contrib-compass/tasks/compass.js Verifying property compass.dist exists in config...OK File: [no files] Options: force, trace, sassDir="assets/stylesheets", cssDir="../../[path/to/build]"
If I run the "grunt watch" and update any style I will get: File "assets/stylesheets/style.scss" changed. but after that will get endless Running "compass:dist" (compass) task again.
Gruntfile.js code:
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
grunt.initConfig({
themeDir: "../../[path/to/build]",
assetsDir: "assets",
scriptsDir: "<%= assetsDir %>/javascripts",
stylesDir: "<%= assetsDir %>/stylesheets",
watch: {
options: {
livereload: false
},
compass: {
files: ['<%= stylesDir %>/**/*.{scss,sass}'],
tasks: ['compass']
}
},
// compass and scss
compass: {
dist: { // Target
options: {
force: true,
trace: true,
sassDir: '<%= stylesDir %>',
cssDir: '<%= themeDir %>'
}
}
}
});
UPDATE Used versions is: ruby 1.9.3 compass 1.0.1 node 0.10.33 grunt 0.4.5
The problem was because of the ruby version. After updating to version 2 everything works now.