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