How do I update to the latest version of SASS?
Solution 1:
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).
Solution 2:
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
Boom.
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:
#!/usr/bin/ruby1.8
#
# 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.
Solution 3:
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
Sources
- Installing Sass and Compass Ubuntu 12.10
- How to install sass on Ubuntu Precise 12.04 LTS