While setting up a grunt.js file, I ran into the following stubborn error.
Running "sass:dist" (sass) task Errno::ENOENT: No such file or directory @ rb_sysopen - undefined Use --trace for backtrace.
After having Googled several solutions to the problem. I ended up updating my Ruby and uninstalling and re-installing nodejs among other things.
It turns out I had a misspelling in the directory of the key-data pair inside the grunt.js file.
I missed it because it was on a line that was off the screen.
This error can at times appear to be a more serious issue than it really is.
So remember to check your grunt.js file proper syntax first. You just might save yourself some trouble.
... // Project configuration. grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), sass: { dist: { options: { style: 'expanded' }, files: { 'path/to/the/css/content/style.css': 'destination/path/to/the/other/--->misspelling-here<---/css/content/style.css' } } }, ... }); ...
I had same issue in my local workspace. Thanks Paul for the info
I’m glad this was able to help, Mahesh. 🙂
Thanks.. It helped.. 🙂
Thanks so much for adding the “rb_sysopen – undefined” to the error. You’re the only page I found with the solution! … Just a stupid typo “scss” dir instead of “sass”… Frustrating!!
Ha! That’s why I included that detail. Very gratifying to know it was helpful.
That actually helped me. I wish the bower script was more informative on that one. Thank you!
I’m glad you were able to benefit! Happy Grunting! Whoah! that just sounds “wrong”!
Thank for you this. Sometimes errors can be the death of ones confidence.
A common frustration. I’m so glad it helped. This was not an easy error to decipher.
Thanks! Everyone else was saying it was a Ruby gem problem, but your article caused me to reexamine my grunt config versus my file names. Saved the day!
So glad to hear it helped, Nick!
I am developing a Rails 5 app, i have this error but i don’t know where is the grunt.js file?