grunt-contrib-compass doesn't execute task - xcode

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.

Related

How to use compass on Grunt with libsass instead of ruby sass?

We've been using the Ruby version of the sass compiler with compass and grunt-contrib-sass for quite a while but it's very slow.
Since libsass is faster than its Ruby pendant, we replaced grunt-contrib-sass with grunt-sass.
Unfortunately, the docs for grunt-contrib-compass say:
This task requires you to have Ruby, Sass, and Compass >=1.0.1
installed
Also, when I run our build, I get:
Running "sass:dist" (sass) task
>> Error: File to import not found or unreadable: compass
>> Parent style sheet: src/assets/sass/catalog.scss
>> on line 15 of src/assets/sass/catalog.scss
>> >> #import "compass";
>> ^
Warning: Use --force to continue.
So, if grunt-contrib-compass is not compatible with grunt-sass how can I use compass with libsass then?
Found the solution. It was as easy as installing compass-importer:
$ npm install --save-dev compass-importer
And then set importer: compass in Gruntfile.js

How can I compile sass and bower install on heroku with a PHP app?

How can I compile sass and run bower install on heroku with a PHP (Laravel) app?
For Sass, everything seems to point to using Sass with rails. I have tried adding a script in my composer.json file and that doesnt work because Sass is not detected on heroku.
For bower, I tried adding a package.json, installing bower locally, and using that to run bower install but when I put a package.json file in my directory, it thinks my app is a node app so I cant get my Laravel app to even start.
https://github.com/dzuelke/heroku-multipack-nodejs-php-example is one way of doing that - the example runs both the Node and the PHP buildpack, so you'd have to add the Ruby buildpack to the beginning of the list as well and have a Gemfile that requires Sass.

SASS --watch issue on windows 8.1

I've got some issues with SASS. After updating the .scss file, the .css file won't update.
Lets say that this is my folder structure:
-scss
-style.scss
-css
-style.css
index.html
And I'm using this command from project root in cmd:
sass --watch scss/style.scss:css/style.css --style compressed
It compiles it the first time, but when I make some changes in the .scss file, it doesn't update.
I'm using:
win 8.1 64bit
ruby 2.0.0p481 64bit
Sass 3.4.2
How to make it watch for updates? Or am I doing something wrong?
Thanks
Update: Tested the same thing on ubuntu 14.04 and it works just fine (however, on ubuntu I've installed the latest version of ruby - ruby 2.1.2p95 )
Update 2: Issue on GitHub
This was a bug in Sass 3.4.2: https://github.com/sass/sass/issues/1409
It was fixed in Sass 3.4.3: http://sass-lang.com/documentation/file.SASS_CHANGELOG.html#343_4_september_2014
If you're using Bundler, make sure your Sass version is not restricted to 3.4.2 in your Gemfile. Recommended line is gem 'sass', '~> 3.4.3'. The run bundle update within your project root.
If you're not using Bundler, simply run gem update sass.
I also came across this issue. I downgraded Sass to version 3.3.14 and it worked for me again. No idea why.
Using:
win 8.1 64bit
ruby 2.0.0p481 64bit
I had same problem and upon solution didn't helped. Looks like ruby on windows 8 has WDM (Windows Directory Monitor) problem and --watch command is not working properly.
I solved problem in this way:
Downloaded and installed Installed Ruby 1.9.3p550 - Download link
Downloaded and installed Development Kit (which is required to install WDM) for Ruby 1.9.3 -
DevKit-tdm-32-4.5.2-20110712-1620-sfx.exe
Extract DevKit to path C:\Ruby193\DevKit
Run cd C:\Ruby193\DevKit
Run ruby dk.rb init
Run ruby dk.rb review
Run ruby dk.rb install
Then run gem install wdm
And after that, --watch command is working properly.
Hope this way will help someone.

Warning: spawn ENOENT Use with Grunt sass task

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.

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

Resources