Install Sass on macOS

Install Sass on your Mac.

This is a simple short guide on how to install Sass on your Mac. If you receive an error whilst installing Sass, this article should provide a quick and simple solution. At the time of writing I am using macOS Sierra 10.12.5.

1. Sass installation via standard command line

As macOS comes pre-installed with Ruby, installing Sass should be a simple matter of going to the command line (Utilities / Terminal Window) and typing:

gem install sass

However, if the following error is thrown, an elevated command is required (proceed to step 2).

ERROR:  While executing gem … (Gem::FilePermissionError)
You don’t have write permissions for the /Library/Ruby/Gems/2.0.0 directory.

2. Sass installation via elevated command line (sudo)

sudo gem install sass

This solves the issue of file permissions, and Sass attempts installation. However, if a new error is thrown as follows, we must continue a step further (proceed to step 3).

Building native extensions.  This could take a while…
ERROR:  Error installing sass:
ERROR: Failed to build gem native extension.

3. Install Command Line Developer tools first, then proceed with Sass installation

Tools installation: xcode-select ‑‑install

Sass installation: sudo gem install sass

Verify the install: sudo sass -v

Sass 3.5.1 (Bleeding Edge)

Congratulations, you have installed Sass. I hope this article has been of help to you, please see below for a concise screenshot of the process. If you would like to see a Windows version of this guide, please let me know.

How to install Sass on a Mac

Other posts
  • Blue Hotel Illustration
    Blue hotel (2D illustration) I haven’t posted in a long time. I set up this blog with the intention of updating it regularly, however it has not worked out
  • An article on thin line display issues when PDFs are viewed in AcrobatAn article on thin line display issues when PDFs are viewed in Acrobat
    Do your PDF Line weights look wrong in Acrobat? A simple solution to Acrobat’s ‘enhance thin lines’ feature. Adobe Acrobat will sometimes add
  • Heatwave Illustration
    Heatwave (2D illustration) This is an illustration project I have been working on with reference to the recent weather in the UK. In this isometric piece I present
  • Illustration (Urban Theme)
    Spirit of the Staircase (2D illustration) This is a section of a larger illustration I am working on. It is part of a series of 2D vector illustrations which I hope
  • How to Transfer Local WordPress sites to a Live Server
    This is a step by step guide on how to transfer local WordPress sites to a live server. The server I am using in this article has a cPanel backend. This guide