bdkjones / CodeKit-1-Old

147 stars 1 forks source link

SCSS + Compass compilation super slow after installing CLI for sass + compass #725

Closed brendanfalkowski closed 10 years ago

brendanfalkowski commented 10 years ago

I realize this is for CodeKit 1, but I'm in the middle of several projects so swapping in CodeKit 2 really wasn't a priority. One of these projects is using GulpJS to build everything. After running these commands to get Gulp working (it does)...

gem install sass gem install compass

...CodeKit is extremely slow to compile another project. Now 66s (before it was ~2s). CodeKit is configured to use its internal compilers for both Sass and Compass. Nothing has changed except installing the CLI on my system.

Not really sure how to debug this. The massively slowed down project does use Compass' sprites, but they're not changing. The 'ruby' process maxes out my CPU, and if I don't disable browser auto-reloading it will crash Chrome now. This all pretty much worked perfectly before installing those gems.

Any idea what to do?

Attached some system info:

$ gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 2.0.14
  - RUBY VERSION: 2.0.0 (2014-02-24 patchlevel 451) [universal.x86_64-darwin13]
  - INSTALLATION DIRECTORY: /Library/Ruby/Gems/2.0.0
  - RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - universal-darwin-13
  - GEM PATHS:
     - /Library/Ruby/Gems/2.0.0
     - /Users/brendan/.gem/ruby/2.0.0
     - /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/
$ sass -v
Sass 3.3.7 (Maptastic Maple)
$ compass -v
Compass 0.12.6 (Alnilam)
Copyright (c) 2008-2014 Chris Eppstein
Released under the MIT License.
Compass is charityware.
Please make a tax deductable donation for a worthy cause: http://umdf.org/compass

Putting this in config.rb, I get "2.0.0":

throw RUBY_VERSION
brendanfalkowski commented 10 years ago

Possibly related issue in CodeKit 2: https://github.com/bdkjones/codekit2/issues/286

brendanfalkowski commented 10 years ago

After many trials of making CodeKit use external binaries for sass, scss, and compass. This simply wasn't working. So I looked up how to remove a gem, and did this:

$ sudo gem uninstall compass
Password:
Remove executables:
    compass

in addition to the gem? [Yn]  y
Removing compass
Successfully uninstalled compass-0.12.6

Now CodeKit is back to compiling SCSS+Compass in ~2s, but this means I can't use Compass with GulpJS. So I'll probably be switching that project to using Autoprefixer, and using CodeKit only for Compass projects that require sprites. Ultimately those are dwindling as the need for PNG sprites is acceptably being replaced by SVG, and that's the #1 reason I stuck with Compass.