Macbook comes with pre-installed ruby. To check whether you have ruby installed in your system open the terminal app and type the following underlined code and press enter.
mymacbook:~ $myname ruby–v
It should display something like this:
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
This means you have ruby already installed in your macBook.Now you try to install sass by typing the following code in the terminal:
mymacbook:~ $myname gem install sass
If you get error, try the following code
mymacbook:~ $myname sudo gem install sass
and type the password to grant access for installation.
If you get error again, type the following code in terminal and press enter.
mymacbook:~ $myname xcode-select –install
This will install xcode command line developer tools.It will take 2-3 minutes to complete the process. After this, type again the following code in terminal and press enter.
mymacbook:~ $myname gem install sass
or
mymacbook:~ $myname sudo gem install sass
Now to check whether sass has been installed in your macBook, type the following code in your terminal and press enter.
mymacbook:~ $myname sass –v
you should see something like this:
Saas 3.5.1 (Bleeding edge)