How to install Compass Gem on MacOS?

Compass is a sass-based stylesheet framework that streamlines the creation and maintenance of CSS. Installation of gems required ruby so if you have ruby installed then skip to Installing Compass Gem else continue reading . You can confirm whether ruby is installed or not by

ruby -v

Note: Macbooks comes with ruby installed but we still recommend you the following method because of the restrictions in the default installation.

Installing rvm and ruby

For installing ruby we recommend to use rvm which is a ruby version manager that gives you functionality to use different versions of ruby with different projects. For installing rvm and ruby run following command.

\curl -sSL | bash -s stable --ruby

Note: If you face permission error then run

sudo chown -R $(whoamI) /usr/local

Now start using the ruby provided by rvm by

rvm use ruby

Installing Compass Gem

These commands will install you compass gem

gem update --system
gem install compass

Leave a Reply

Your email address will not be published. Required fields are marked *