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
Related
I've installed sass and compass - the compass watch and compile are working fine, but the #import "compass/reset"; in the screen.scss gives this error:
C:/Ruby193/bin/scss.bat --no-cache --update screen.scss:screen.css
error screen.scss (Line 6: File to import not found or unreadable: compass/reset. Load paths: )
Tried also #import "compass/css3" but gives the same error.
Tried uninstall and reinstall of both sass and compass, then I read something about incompatible versions so tried just installing compass on its own. I'm not familiar with ruby so would appreciate help with what to try next.
Versions:
ruby 1.9.3p125
Sass 3.4.5
Compass 1.0.1
Windows 7
Phpstorm 7.1
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.
I am a newb to the command line. The furthest I have taken it was to install the sass version of Foundation successfully. I want to try out Susy to see if it suites my needs better. I was following the 11 videos series on Susy Tutorials on Level Up Tuts by Scott Tolinski. I followed him step by step during the installation process all the way up until the "compass watch" command within my root folder. I was then thrown this error:
NoMethodError on line ["31"] of /Users/bradgabel/.rvm/gems/ruby-2.0.0-p247/gems/compass-1.0.0.rc.0/lib/compass/sass_compiler.rb: undefined method `on_compilation_starting' for #Sass::Plugin::Compiler:0x007fe4a41def80>
Run with --trace to see the full backtrace
The gems I have installed are:
compass (1.0.0.rc.0, 0.12.7)
compass-core (1.0.0.rc.0)
compass-import-once (1.0.4)
sass (3.4.0.rc.2, 3.2.19)
susy (2.1.3)
Try to put this on your sass file.
#import "susyone";
hope can solve your problem.
I am also having issues using compass watch from the command line but mine was after I updated my susy / sass gems. I have found that using preros was much easier and you can configure it to use the same config.rb file + your system ruby gems without having to navigate the command line. Best of luck.
I'm using Jekyll to create a static website and want to use the framework Bourbon to build my CSS from.
I've installed Jekyll and want to install Bourbon by adding it to my Gemfile using gem 'bourbon' and running bundle install.
Now when I add the rule #import 'bourbon'; to my SCSS file and start to run Jekyll by jekyll serve -w it starts, but when I modify my SCSS file the Jekyll watcher throws an error saying:
Regenerating: 1 files at 2014-07-03 10:00:11 `Conversion error: There was an error converting 'css/main.scss'.`
...error:
Error: File to import not found or unreadable: bourbon. Load path: /Users/mark/Code/markdejong.com/mistermark.github.com.jekyll/_sass
Error: Run jekyll build --trace for more information.
What can be the problem here? Shouldn't it be possible to import it like this or doesn't Jekyll support this?
Assuming you have a Gemfile:
source 'https://rubygems.org'
gem 'jekyll'
gem 'bourbon'
gem 'neat'
Add this line to _config.yml
gems: [bourbon, neat]
Jekyll will require these gems automatically.
Just do for import:
#import 'bourbon';
#import 'neat';
Check Jekyll docs for more information
http://jekyllrb.com/docs/plugins/
Did you do a
bourbon install
In order to create the bourbon folder ?
Bourbon's doc also says that for non rail app the import rule is :
#import 'bourbon/bourbon';
Did you import Bourbon at the Ruby level, with require 'bourbon?
Or in your Sass configuration?
With Sass, to use Bourbon installed with RubyGems, you have to tell the following command (note the argument -r bourbon):
sass -r bourbon -w css:sass
I do not know Jekyll, but it's perhaps a clue?
I have compass 1.0.0.alpha.18 installed with Sass 3.3.2 and Susy 2.0.0 and get
"Loaderror on line["45"] of C: cannot load such file --wdm"
The process that I am trying in the console is this:
gem install sass
gem install compass
When I do this, it tells me "successfully installed compass-0.12.3 but if I run compass --version I get Compass 1.0.0.alpha.18.
gem install susy
compass watch [my sass folder]
Returns: Compass is watching for changes
overwrite ../css/styles.css
Loaderror on line["45"] of C: cannot load such file --wdm
Any help would be greatly appreciated.