Warning: spawn ENOENT Use with Grunt sass task - macos

I recently downloaded OSX Yosemite and now grunt-contrib-sass is not working and I am getting the error:
Running "sass:dist" (sass) task
Warning: spawn ENOENT Use --force to continue.
Aborted due to warnings.
I'm not a grunt expert, do I need to reinstall any plugins or something else? I'm happy to provide any other information if needed. Thanks.

Adding it as an answer here from comments above for posterity.
That error usually means Sass isn't installed. Run gem install sass to install it.
For me, it kept failing to install, so ran gem install sass --debug --backtrace --verbose and that fixed the no implicit conversion of nil into String (TypeError) install error.

I noticed that running compass directly threw an exception, so I uninstalled compass and reinstalled it (making sure to delete all compass binaries on PATH) and that fixed it.

Related

Unable to start Grunt on OSX. Where does one add Compass?

Running "concurrent:test" (concurrent) task
Warning: Running "compass:dist" (compass) task
Warning: You need to have Ruby and Compass installed and in your system PATH for this task to work. More info: https://github.com/gruntjs/grunt-contrib-compass Use --force to continue.
Aborted due to warnings.
It is unclear to me where one needs to add ruby and compass? I'm unsure if I even need those two.
Ruby should be installed already on your mac.
Try
ruby --version
if you are not sure.
If ruby is installed you use
sudo gem install compass
That should do the trick.

grunt-contrib-compass doesn't execute task

I recently changed my mac. I used to worked with grunt and grunt-contrib-compass without issues but since i changed, compass doesn't work anymore.
I installed every tools i needed (ruby, compass, sass, xcode, command line tools, grunt ,etc ..) and kept the same gruntfile.js and configuration. When i run grunt, every task are executabe, even compass, but grunt-contrib-compass do nothing, it show this :
Running "compass:dev" (compass) task
//nothing
Running "csslint:dev" (csslint) task
>>1 file lint free.
// csslint, like the others plugins, works fine
The issue doesn't from my grunt configuration because in the same folder, grunt-contrib-compass work in my old mac.
I noticed xcodebuild doesn't run during grunt's execution.
Any idea where is my problem ?
Have you installed both Compass and SASS?
You should not install SASS if you have installed Compass:
// * for Compass, run `npm install --save-dev grunt-contrib-compass`
// This depends on the ruby compass gem, which can be installed with
// `gem install compass`
// You should not install SASS if you have installed Compass.

Yeoman error: "Errno::EACCES on line ["897"] of C: Permission denied"

I upgraded my hardware yesterday and fresh installed Win 8.1. This error is killing me since then. I already lost full day of work trying to figure out what's going on. I never encountered this on my Mac or in my old Win 7 machine.
Setting up a new project with yo webapp using Bootstrap and Modernizr works great. Server would fire-up and I can see my updates livereload. But, setting up a new project with Compass and SASS included would prevent me from starting local server and throw this error:
D:\test>grunt serve
Running "serve" task
Running "clean:server" (clean) task
Running "concurrent:server" (concurrent) task
Running "copy:styles" (copy) task
Done, without errors.
Warning: Errno::EACCES on line ["897"] of C: Permission denied - (D:/test/.t
mp/styles/main.css20140323-6060-d9r9eo, D:/test/.tmp/styles/main.css)
Run with --trace to see the full backtrace Use --force to continue.
Aborted due to warnings.
Execution Time (2014-03-23 20:05:00 UTC)
concurrent:server 4.8s ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 100%
Total 4.8s
D:\test>
I updated Compass and SASS to latest version, reinstalled Yeoman & Ruby, and tried bunch of other small tweaks. Nothing worked.
Any ideas what else I could try?
I have found solution for this issue. I guess this might help with other similar problems running grunt server. This is what did it for me:
Uninstall SASS
gem uninstall sass
Uninstall COMPASS
gem uninstall compass
Install --pre COMPASS version
gem install compass --pre
Install --pre SASS version
gem install sass --pre
For some reason only running task in this order worked for me. I hope this helps.
Issue is solved in SASS 3.2.19
Try gem update compass

Problems when creating Compass project (EACCES on line ["891"])

I am having problems when creating a new compass project (Windows 7). I get this:
C:\>compass create a
create config.rb
Errno::EACCES on line ["891"] of C: Permission denied - (C:/a/config.rb20140321-6828-1g0ytlc, C:/a/config.rb)
Run with --trace to see the full backtrace
I have tried to start cmd with "Run as administrator", I have tried to delete compass, sass and ruby, and reinstalled without any luck. Anyone else having problems or know a solution to this irritating problem?
I was using the latest version (21.03.2014) of compass v.0.12.4...
Downgraded to v.0.12.2 everything worked fine!
Looks like a bug?
To downgrade:
$ gem uninstall compass
$ gem uninstall sass
$ gem install compass -v 0.12.2
$ gem install sass -v <rev>
Please update to Sass 3.2.18 and let me know if that fixes it.
Is this linked to
Compass/Sass writing files with "No Access" permissions for Everyone group on OSX?
If so, updating to 3.2.18 hasn't made a difference.
This has been resolved in Compass version 0.12.5
https://github.com/chriseppstein/compass/issues/1618

Ruby and compass path with yeoman project

I installed ruby, yeoman, and when I run my project, I have this error:
Warning: Running "compass:dist" (compass) task
Warning: You need to have Ruby and Compass installed
this task to work. More info: https://github.com/gru
Use --force to continue. Use --force to continue.
I have the path into the variable session target, but it doesn't work. Can anyone help me?
I had to run this:
gem install compass
Found here: Angular with Yeoman 1.0 and Grunt
(I thought I had Compass installed by following the instructions here but it wasn't sufficient.)
The problem comes from compass being called compass2.0
I solved the issue by symlinking compass to compass2.0
Here's the command: sudo ln -s /usr/bin/compass2.0 /usr/bin/compass
Hope this helps
I was getting the same error. Turns out it was masking the real error:
{ '0': [Error: Error: not found: bundle],
'1':
{ stdout: '',
stderr: 'Error: not found: bundle',
code: 127,
toString: [Function] },
'2': 127 }
Fixed with:
sudo gem install bundle --no-user-install
I had the same issue on Windows 7 too..
This is what I did.
Install Ruby with Ruby installer
Install the Compass with gem, (Installing the compass with npm didnt have any effect)
gem install compass

Resources