Download all gems dependencies

That’s precisely the problem I had. After searching around for a while I found a solution that works using Bundler https://bundler.io/ Getting Gem with Dependencies: Create a new Folder with a File named Gemfile. Write a Source and the Gem you want to have the dependencies for into the File Example: source “http://rubygems.org” gem ‘rails’, … Read more

Does Sass have a switch function?

No there isn’t any supported switch statement in sass but if you only need to use the switch statement to tweak a variable, you can use sass maps in a switch statement sort of way. Using SASS maps in place of a switch statement $newVar: map-get(( case_1_test_name : case_1_return_value, case_2_test_name : case_2_return_value, ), $testVar); So … Read more

Automatic darken color in Sass / Compass

I thought about this. The only way I found is by creating a mixin : @mixin setBgColorAndHover($baseColor) background-color: $baseColor &:hover background-color: darken($baseColor, 5%) And then : .button +setBgColorAndHover($green) // as $green is a color variable I use. Not the best, but that will do the job 🙂

Compass: generate Sprites, plus width / height on each images in the sprite

This works: @include all-<map>-sprites(true); But you may want to consider the documented way of using configuration variables: http://compass-style.org/help/tutorials/spriting/ You just specify the config variable before the import. In your case: $ico-sprite-dimensions: true; @import “ico/*png”. @include all-ico-sprites; Sending true to the all include works, but as it’s undocumented, it would seem that configuration variables are the … Read more

How to use compass with rails 3.1

UPDATE: Seems like there is a better way ! Source: http://spin.atomicobject.com/2011/07/12/sass-sprockets-compass-with-rails-3-1/ UPDATE 2(dec 2, 2011): Chris Eppstein, creator of Compass posted this Github Gist of how to integrate Compass with Rails 3.1: https://gist.github.com/1184843 I now prefer this method over mine, as I noticed a great speed improvement at compilation time when using livereload. MY METHOD: … Read more

Too many open files – Failed to initialize inotify: the user limit on the total number of inotify instances has been reached

For Linux: Check current value of max_user_instances: $ cat /proc/sys/fs/inotify/max_user_instances increase that value: $ echo 256 | sudo tee /proc/sys/fs/inotify/max_user_instances In order to make that change permanent you can always add a line to /etc/sysctl.conf: fs.inotify.max_user_instances = 256 If your system has a /etc/sysctl.d directory, you would rather put your custom settings in a separate … Read more

Are there any Sass code formatters? [closed]

Online Paste your CSS/SCSS/LESS into dirtystylesheet.com and hit Clean Via Command Line Via command line you can re-format CSS/SCSS/Sass using the sass-convert script: $ sass-convert messy.scss clean.scss or CSS to SCSS: $ sass-convert messy.css clean.scss or SCSS to Sass: $ sass-convert messy.scss clean.sass The sass-convert script is installed when you install Sass. It can convert … Read more

What is workflow in Yeoman to work with Sass files?

What you are looking for is documented on: https://github.com/yeoman/grunt-usemin Simply wrap your css imports in a comment block similarly to the way it’s done with the javascript files <!– build:css styles/main.css –> <link rel=”stylesheet” href=”https://stackoverflow.com/questions/15617431/styles/base.css”> <link rel=”stylesheet” href=”styles/modules.css”> <link rel=”stylesheet” href=”styles/layout.css”> <!– endbuild –> make sure your generator is up to date and your grunt … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)