Can't uninstall sass gem to use newer version - ruby

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.

Related

SASS not working after OSX upgrade

I looks like SASS is trying to use the wrong version of ruby after the Yosemite update:
$ sass
bash: /usr/bin/sass: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
I'm pretty sure it should be pointing to /System/Library/Frameworks/Ruby.framework/Versions/current/...
Is there a way to update the sass ruby path?
edit
$sudo gem update sass
Has no effect
Uninstalling sass and reinstalling it fixed this
sudo gem uninstall sass
sudo gem install sass
You don't need to run sudo gem uninstall sass (sass -v yields the same error).
Running just sudo gem install sass is sufficient to update SASS.

How do I update/fix the SASS and Compass $PATH to work with grunt-contrib-compass

I am trying to run grunt-contrib-compass, but running into this error:
Warning: Couldn't find the `compass` binary. Make sure it's installed and in your $PATH Use --force to continue.
I've run:
sudo gem install compass
sudo gem install sass
sudo gem update --system
When I do gem list, I get:
compass (1.0.1)
rails (4.1.6)
sass (3.4.5, 3.3.4)
ruby:
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin12.0]
Any suggestions or solutions on how to get grunt-contrib-compass working?
You have to install, first
sudo apt-get install ruby gem ruby-dev
second
sudo gem install compass
Did you find your solution? I had the same error on Ubuntu 14.04.
Compass is a gem but you also need ruby-compass. If you do compass -v, it might say you don't have ruby-compass and need to install it. This was my case so I did sudo apt-get install ruby-compass which solved my problem.

Upgrading SASS in a way that I can downgrade if needed?

I'm using a very old version of SASS (3.1.15) in the Compass framework, and I want to upgrade to 3.4.3, which is the latest. I'm researching the process of upgrading, and after reading the SASS changelog, I'd like to be able to upgrade, then if I see a lot of errors and whatnot, revert back to the old version since I currently have actual development work to do in parallel with this research. I want to avoid being blocked due to legacy code being incompatible with new SASS, but I also want to see what issues an upgrade would bring, if any. Is there a way to do this?
I believe it would be as simple as this to upgrade:
$ sudo gem uninstall sass
$ sudo gem install sass --version 3.4.3
Then if you want to switch back to the old version:
$ sudo gem uninstall sass
$ sudo gem install sass --version 3.1.15
Both Bundler and RVM allow you to specify gems in their own way. Bundler is project-based, while RVM uses gemsets.

CodeKit: Sass/Compass Conflicts

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!

Susy not working with Compass and Sass

I'm getting a Gem:ConflictError when trying to run Susy. I noticed that Compass depends on sass 3.2.19 But the latest Susy depends on Sass (< 3.5, >= 3.3.0). I'm a nubie at this so what can I do to fix this?
Thanks!
You need to update your Compass to 1.0.0 or later.
gem install compass --pre
Even easier, use Bundler. Provided your Gemfile includes sass 3.3, Bundler will add the other dependencies.
So I was able to answer my own question by combining some of the answers I found here.
First uninstall compass an then do the follow:
Install rvm (stable with ruby add --insecure flag for SSL related issues) $\curl -sSL --insecure https://get.rvm.io | bash -s stable --ruby
Restart Terminal / Resource your profile
Run rvm requirements --with-gcc=clang You won't have to update Ruby because you downloaded the last stable version
And last step to run gem install compass --pre
I hope this helps anyone else who runs into the same problem!

Resources