How to install Sass on Mac

Howto Mac


In this tutorial we will learn to install Sass on Mac.

Step 1: Install Ruby

If you are on a Mac running (OS X El Capitan, Yosemite, Mavericks, and macOS Sierra) then chances are you already have Ruby installed on your system.

For more details on Ruby visit their website.

Type the following command in the terminal and check the version of Ruby.

$ ruby -v


YUSUF-MacBook-Pro:~ yusufshakeel$ ruby -v
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
YUSUF-MacBook-Pro:~ yusufshakeel$

If you don't have Ruby installed then use Homebrew to install Ruby. Homebrew is a package manager for Mac.

To install Homebrew run the following command.

$ /usr/bin/ruby -e "$(curl -fsSL"

For more detail on Homebrew check their website.

Now, run the following command in the terminal to install Ruby using Homebrew.

$ brew install ruby

Step 2: Install Sass

Once you have Ruby on your Mac run the following command to install Sass.

$ sudo gem install sass


YUSUF-MacBook-Pro:~ yusufshakeel$ sudo gem install sass
Fetching: sass-3.4.23.gem (100%)
Successfully installed sass-3.4.23
Parsing documentation for sass-3.4.23
Installing ri documentation for sass-3.4.23
1 gem installed
YUSUF-MacBook-Pro:~ yusufshakeel$

You can run the gem list --local command in the terminal to check the list of gems you have installed on your Mac.

YUSUF-MacBook-Pro:~ yusufshakeel$ gem list --local

*** LOCAL GEMS ***

sass (3.4.23)
YUSUF-MacBook-Pro:~ yusufshakeel$

In the above output we can see that we have Sass v3.4.23 installed.

To check the version of Sass installed on your Mac use the sass -v command.

YUSUF-MacBook-Pro:~ yusufshakeel$ sass -v
Sass 3.4.23 (Selective Steve)
YUSUF-MacBook-Pro:~ yusufshakeel$

Uninstall Sass

To uninstall Sass use the following command.

$ sudo gem uninstall sass


YUSUF-MacBook-Pro:~ yusufshakeel$ sudo gem uninstall sass
Remove executables:
	sass, sass-convert, scss

in addition to the gem? [Yn]  Y
Removing sass
Removing sass-convert
Removing scss
Successfully uninstalled sass-3.4.23
YUSUF-MacBook-Pro:~ yusufshakeel$

Alright, this brings us to the end of this tutorial. Have fun coding.


Recently Added