grunt compass Error: invalid option --sourcemap - sass

i run grunt dev and get the error:
Running "compass:dev" (compass) task
Error: invalid option: --sourcemap
Don´t know why :(
Don´t even know how i could run compass without the option ... found nothing in the gruntfile.
thanks for help, i´m new with grunt/compass/sass

Execute "gem list" so we can have more details on what gem versions you're using.
AFAIK the sourcemap works since sass 3.3 and up.
If you want to disable the sourcemap on your project, check your config.rb file and check the sass_options entry, you might find ":sourcemap => true". If you find it, remove it and check it out.
Hope it helps!

This happens because of old version of SASS (or COMPASS, if you are using it) ruby gems which do not support sourcemap options.
Update these with following commands:
gem update sass
gem update compass <= if applicable
This should resolve the issue.

Related

listener.rb: Not a directory

In the past few week, I've started seeing errors when I try to run compass watch:
Errno::ENOTDIR on line ["60"] of /Library/Ruby/Gems/2.0.0/gems/listen-2.8.0/lib/listen/listener.rb: Not a directory - /Users/nick/.compass/extensions/readme.txt/stylesheets
It will watch and compile the SCSS into CSS once and then I have to run compass watch again and get that error. When I run compass watch --trace, I get this:
https://www.dropbox.com/s/s1cia842dusitol/compass-watch-trace.png?dl=0
My versions are Compass 1.0.1 (Polaris) & Sass 3.4.9 (Selective Steve)
I had the same problem when running compass watch in terminal because I was in the wrong directory. Are you running it in the same directory as the config.rb file is located at?
I fixed it by first navigating to the folder config.rb is in and then executing compass watch...
Best option I found was this: Failed to build gem native extension (installing Compass)
After that, I starting using http://mhs.github.io/scout-app/ and that worked fine. When I started a new job that uses Grunt, I ditched compass watch all together and used the grunt-contrib-sass plug-in to get the job done.

sass source map issues on OS X Yosemite

I recently updated to OSX Yosemite and now, when I run Grunt and make changes to the sass file in my project, I receive the following error:
Warning: Error: Error generating source map: couldn't determine public URL for the source stylesheet.
No filename is available so there's nothing for the source map to link to.
on line of standard input
Use --trace for backtrace. Use --force to continue.
I have made no other changes to my Grunt setup or sass:dist, dependencies are unchanged and so forth. Any help resolving this would be greatly appreciated. Thanks!
This issue can have more than one reason, maybe this will help you.
Before starting remove the compiled css!
Update grunt-contrib-sass to the latest version
Sourcemap Requires Sass 3.4.0, which can be installed with gem install sass
Run grunt sass task and review compiled css.
When everything is updated, the sourcemap should be automatically created and available. Be sure to empty browser cache before testing in the browser.

PHPStorm: Missing file for SCSS configuration?

I'm trying to switch over to PHPStorm and I would like to activate the transpiling of SCSS files, but it seems like one file is missing in my ruby-folder.
I found an image in this thread, which shows how to configure the file watcher:
The problem is now that I don't have a "scss.bat" in my /bin/-folder, to insert in the "Program:"-field. I made sure that I have the latest version of ruby by downloading it from rubyinstaller.org.
These ".bat"-files are in my folder:
erb
gem
irb
rake
rdoc
ri
setrbvars
testrb
I tried every file, but I get a different error each time.
What am I doing wrong?
Thanks for your help.
I found my error:
I forgot to install SCSS after my Ruby-installation. To do so open your commandline and type:
gem install scss

Sass Breakpoint causing Grunt error

Just did a fresh install on my MacBook with Mavericks. I'm using Yeoman and grunt to compile my project. After reinstalling and pull down the code from the repo, I see this error:
Warning: LoadError on line ["55"] of /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:
cannot load such file -- app/bower_components/compass-breakpoint/lib/breakpoint
Run with --trace to see the full backtrace Use --force to continue.
I'm requiring Breakpoint in my gruntfile.js. If i remove the require, everything compiles as expected, without errors.
Let me know if I can provide any more details. Thanks
So the error appears to be caused by you not pointing to the correct file (that's what the cannot load such file error means), so double check that your import path is correct, but at the moment, you must use Breakpoint through Ruby Compass as it requires a bit of Ruby code in order to function properly. With Sass 3.3 available, this Ruby dependency goes away Breakpoint gets updated, but it will require a compiler compatible with Sass 3.3 (libsass, what powers grunt-sass, is not compatible with Sass 3.3, for instance).
I would encourage you to use grunt-contrib-compass, use Bundler to manage Ruby version dependencies, and compile through Ruby Compass. These steps should resolve your issues.
Would suggest to go with NPM breakpoint. For installing:
npm install breakpoint-sass & add require 'breakpoint' in your config.rb file.

Installing the correct environment for Angular with Compass and all other Node dependencies

I am just trying to make a local development environment that isn't on my work computer, and I keep getting an error:
Warning: Errno::ENOENT on line 441 of /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/pathname.rb: No such file or directory - /Users/johnpett/Desktop/Node/app/bower_components
Run with --trace to see the full backtrace Use --force to continue.
I have installed all the Ruby parts and Yeoman to build the app scaffold, but I can't seem to run the 'grunt server' command without throwing up this error.
The error is quite clear, a grunt-plugin require that file...
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/pathname.rb
Anyway ruby components are needed usually if you plan to use compass, if not, you can comment the "compass" sub-task in the "server" task in Gruntfile.js
Your folder was surely not called bower_components at that time. I guess you used yeoman.
In your compass task config you should have modified bower_components.

Resources