CodeKit: Sass/Compass Conflicts - compass-sass

I get this error when I try to compile using Compass on Codekit:
Compass failed to run because your Mac has an older version of Sass
and/or Compass installed that conflicts with the newer versions in
CodeKit. You must remove all versions of Sass below 3.3.rc6 and all
versions of Compass below 1.0.alpha18. Do this at the command line by
running 'sudo gem uninstall sass' and 'sudo gem uninstall compass'.
I ran sudo gem uninstall sass and sudo gem uninstall compass, however when I try to compile through CodeKit again I get the same error.

try running gem query --local this will list local gems, once you have a list, just go through and remove all sass+compass related gems with sudo gem uninstall ___, pretty sure that compass also has compass-core, but there are probably more

How have you initially installed your gems? Is it possible that you've also installed gems with just gem install? Cuz sudo gem installs gems as root for all users while gem install only installs gems for your active user. So maybe gems left installed which aren't uninstalled with sudo gem uninstall?
On the other hand why uninstall compass at all. I am running Codekit 2.1 with its internal Sass 3.3.10 along with the external gem Compass 0.12.4. That actually works quite well. You have go to Codekit Preferences -> Other Tools -> Compassand choose the radio button "Use the Compass executable at this path" and select your Compass gem then.

If you are using RVM for your ruby management then switch to your system ruby version
rvm use system
and install sass and compass for this version
sudo gem install sass
sudo gem install compass
This worked for me!

Related

How to handle different versions (Bourbon) of ruby gems on my Mac

I installed the bourbon gem on my OSX machine some weeks ago:
gem install bourbon
Now i have problems with bourbon in a web project (gulp says "mixins not found") so I wanted to uninstall and re-install the gem. So I typed:
$ gem uninstall bourbon
Surprisingly I get the following message in the terminal:
Select gem to uninstall:
1. bourbon-4.2.6
2. bourbon-5.0.0.beta.3
3. bourbon-5.0.0.beta.4
4. All versions
Hm? It seems that there are different versions of the gem installed and doing
bourbon install
in my project folder installs the latest beta (which lacks some SASS mixins I think). I thought when I install or update a gem that the older gems are deleted or overwritten. So how to handle this the best?
run this:
$ gem uninstall bourbon
Select 4 to uninstall all the versions. Then install the gem again using the command.
gem install bourbon -v 4.2.6
Hopefully it will help.

Can't uninstall sass gem to use newer version

I can't seem to uninstall an old version of sass
I've done
sudo gem uninstall sass
as well as
sudo gem uninstall sass --version 3.2.14
When I try to do
sudo gem update sass
It says there are no updates.
What's the best way from here to force usage of the latest gem?
I hadn't tried taking sudo out. That did the trick.

ruby sass, unable to resolve dependancies

I downloaded two gem files: Sass-3.3.7.gem & compass-0.12.6.gem
I ran gem install --local Sass-3.3.7.gem which it installed.
Followed by the same command for compass, but got the error:
unable to resolve dependencies: compass requires sass (~>3.2.19)
I'm installing them pre-downloaded as I have no connection. Anyone knows what can be the solution?
Compass 0.12.6 apparently depends on sass ~>3.2.19, which means that the version of sass should be bigger than 3.2 and smaller than 3.3, so basically compass needs sass 3.2.x. You have two options.
Also download sass 3.2.19, install both versions of sass, use the latest one yourself and make compass happy.
Just install sass 3.2.19 and use that yourself as well, this obviously only works if you don't need any features introduced in sass 3.3.
Install Sass 3.2.19:
sudo gem install sass -v 3.2.19
I didn't need Sass 3.3.7, and Jekyll keep finding the latest version installed, so I got uninstalled Sass 3.3.7:
sudo gem uninstall sass
Sass doesn't seem to overwrite previous versions, so I still had 3.3.2 installed (if there are multiple versions installed it gives you a choice of what version you'd like to uninstall), so I uninstalled that as well.
You can run gem dependency <gem name> to see list of the gem dependencies and required versions.

Codekit not working with the Compass / Zurb Scss Compiler When I Upgraded to Mavericks with Ruby 2.0

CodeKit is giving me the error of
Compass was unable to compile one or more files in the project:
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: illegal switch in RUBYOPT: -E (RuntimeError)
(This action was triggered by a change to _settings.scss)
It was working fine before the Upgrade.
Found the solution. Go to the "Terminal" and type:
sudo gem update --system
sudo gem install compass
And it's done!
You have CodeKit set to use an external Compass compiler, but you're running that Compass compiler in the old version of Ruby from 10.8 (Ruby 1.8.7).
You need to make sure Compass is running on the new system-installed version of Ruby (2.0) in Mavericks. Once you do that, you'll be all set. If you're using RVM, you can switch it back to the system Ruby and then simply run sudo gem install Compass to have Compass installed in the standard location.
I had this same problem just now. I installed compass again as Bryan suggested. After this it still didn't work, so I went into my preferences and saw that I previously had Codekit compiling from Compass at a user selected path. I switched this to "USe Codekit's internal Compass copmiler" and it is working again.
Found the solution. Go to the "Terminal" and type:
sudo gem update --system
sudo gem install compass
If you see this error:
Gem::LoadError on line ["298"] of /Library/Ruby/Site/2.0.0/rubygems/dependency.rb: Could not find 'zurb-foundation' ....
You probably need to install zurb-foundation, type this:
sudo gem install zurb-foundation
I just Changed my Compass Advanced settings back to internal compass compiler (recommended) and it worked.

Cannot install Ruby Gems in Windows 7

I have successfully installed Ruby Gems on my Mac many times. I need to configure a Windows 7 Enterprise virtual machine with Compass, Sass and Suzy.
I downloaded an installed Ruby on the Windows machine with the installer, 1.9.3. I ran gem update --system which updated Rubygems to 1.8.4.
I was able to install Sass 3.2 by running gem install sass
However, if I run gem install compass or gem install susy I get an error:
Error while excecuting gem .. (ArgumentError) marshall data too short
Any ideas? At this point, I can't install those gems.
The alternative solution..: Download gem compass from here to your ruby root folder. Then try again
gem install compass
It should install this time..Good luck
Had same issue, updating rubygems system solved it. Just use the following command
gem update --system
For those finding this question, many great tips here. Using them, I found this solution to work:
At the N: prompt in "start command line with ruby environment", I used the command rmdir /S .gem which deleted all gems. I then installed them again with gem install as directed on their respective host web pages. Hope this helps someone.

Resources