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; https://github.com/nex3/sass/issues/64, 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?

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

3 Answers 3


What we ended up doing was the following:

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

wget --no-check-certificate https://raw.github.com/joshfng/railsready/master/railsready.sh && bash railsready.sh

Selecting option 2 (RVM) when asked.

Then, we did source ~/.bashrc

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


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.

  • This sounded promising, but please check my updated question.
    – powerbuoy
    Commented Jan 3, 2012 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


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .