Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

This is really stupid but I've been Googling for an hour now and can't find the answer.

I'm on Ubuntu 10.10, and I'm trying to update to the latest version of SASS so that I can use an @import rule inside an @media rule.

As suggested here;, I tried:

$ sudo gem install sass --pre

And that seemed to work fine:

Successfully installed sass-3.2.0.alpha.35
1 gem installed

But when I try $ sass -v I get: Haml/Sass 3.0.9 (Classy Cassidy) which is the old version I had before updating.

What am I doing wrong?

$ which gem

$ which sass

Tried the answer:

$ sass -v
Haml/Sass 3.0.9 (Classy Cassidy)

$ sudo gem uninstall -Iax sass
Removing sass
Removing sass-convert
Removing scss
Successfully uninstalled sass-3.2.0.alpha.35

$ sass -v
Haml/Sass 3.0.9 (Classy Cassidy) (Was expecting an error here)

$ sudo gem install sass --pre
Successfully installed sass-3.2.0.alpha.35
1 gem installed
Installing ri documentation for sass-3.2.0.alpha.35...
Installing RDoc documentation for sass-3.2.0.alpha.35...

$ sass -v
Haml/Sass 3.0.9 (Classy Cassidy)

So it removes the one I successfully installed and leaves the one that actually gets used when I run the sass command. Thougts?

share|improve this question
Can you run which gem and then which sass and add the output to your question? – James Jan 3 '12 at 14:03
Ok, does that tell you anything? :) I'm no good at this tbh. – powerbuoy Jan 3 '12 at 14:33
Can you join me in the chatroom? There are some further questions I'd like to ask. :) – James Jan 3 '12 at 14:37
Just using sudo gem update sass worked for me. – RaphaelDDL May 9 '13 at 13:42

3 Answers 3

up vote 4 down vote accepted

What we ended up doing was the following:

First, we installed rvm using the rails ready one-liner:

wget --no-check-certificate && bash

Selecting option 2 (RVM) when asked.

Then, we did source ~/.bashrc

Then we did a gem install sass --pre (no sudo).

share|improve this answer

Remove it and then reinstall:

sudo gem uninstall -Iax sass
sudo gem install sass --pre

New Edit: I've just seen that you might have been using the haml-edge gem (which packs its own copy of sass). Nuke that and install sass-proper.

sudo gem uninstall -Iax haml-edge
sudo gem install sass --pre


Old Edit if you've still got stuff left over it sounds like there's been a manual install, another gem has set something up or you've installed it from a package. I'd be tempted to tell you to nuke it from orbit and fix it later.

Run nano $(which sass) and see what you're dealing with. In my gem-installed version I see a header like:

# This file was generated by RubyGems.
# The application 'sass' is installed as part of a gem, and
# this file is here to facilitate running it.

If you see something similar, that suggests there's something fishy and I vote you just run:

sudo rm "$(which sass)" "$(which sass-convert)" "$(which scss)"

If there's a different header in there, it might give you a clue where it came from. If it's a package you've installed, remove it. If you can't (eg it's a dependency) you could nuke the file and replace accordingly (knowing that it might break the dependency anyway).

But at the end of the day, it's only a Ruby gem. Killing it isn't going to cancel Christmas.

share|improve this answer
This sounded promising, but please check my updated question. – powerbuoy Jan 3 '12 at 14:28

I've tested this on Linux Mint 14 (Nadia), i.e. Ubuntu 12.10 (Quantal).

1. Check your environnement

First check you current version of sass

sass --version # Sass 3.1.19 (Brainy Betty)
which sass # /usr/bin/sass

2. Remove distro packages

remove packages installed with the packages manager (i.e apt-get or apitude) as they take priority

apt-get remove ruby-sass ruby-compass

Note: this can be skipped if you configure your $PATH to target the right binary (see below).

3. Install new version

apt-get install ruby-full 
gem install sass 
gem install compass

4. Test version

sass --version # Sass 3.2.7 (Media Mark)
which sass # /usr/local/bin/sass


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.