Install sass on Mac or Linux using ruby gem

Sass can be installed on Mac or Linux using ruby gem. To install sass follow these steps.

  1. Install sass gem
    $ sudo gem install sass
  2. In case you get the following error
    ERROR:  While executing gem ... (Errno::EPERM)
        Operation not permitted - /usr/bin/sass

    Then try installing sass in /usr/local/bin

    $ sudo gem install -n /usr/local/bin sass
  3. List sass gem info
    $ gem list -d sass
    *** LOCAL GEMS ***
    sass (3.4.22)
        Authors: Natalie Weizenbaum, Chris Eppstein, Hampton Catlin
        License: MIT
        Installed at: /Library/Ruby/Gems/2.0.0
        A powerful but elegant CSS compiler that makes CSS fun again.
  4. Check sass version
    $ sass -v
    Sass 3.4.22 (Selective Steve)
  5. Display contents in sass package
    $ gem contents -l sass
Share this article: share on Google+ share on facebook share on linkedin tweet this submit to reddit


Click here to write/view comments