Setup Homebrew and RVM on Mac OSX 10.11 EI Capitan

Upgraded to latest MacOSX 10.11 EI Capitan , Then you Might Know about OSX’s new  System Integrity Protection ( SIP ) feature , Now you or any app can’t modify the /System or /usr or any other system files even with root permissions. If you are facing problem while installing  homebrew I am going to show you how to disable SIP temporarily to install homebrew and other SIP related configuration .

Requirements

Install Command Line tools and Xcode ( Xcode optional not necessary )

to install Command Lines Tools open terminal and type this command  

xcode-select --install

and choose install.

Disable SIP

boot into Recovery mode  

press  Command + R

In Recovery Mode Click On ‘ Utilities  > Terminal ‘

terminal

 

csrutil enable --without fs

Disable SIP
above command will enable protection except for file system .

disbaled_sip

then reboot back to normal to EI Capitan then type

sudo mkdir /usr/local
sudo chown -R $(whoami):admin /usr/local

then Install Homebrew , open terminal and paste this line of code Source

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

After installation and reboot again to recovery mode this time enable all SIP , with

csrutil enable

Now reboot back to normal to EI Capitan , then run brew doctor make sure everything is working correctly .
run brew

brew doctor

Installing RVM

RVM is well-known tool for managing different versions of ruby and gemsets , its great tool for installing and manage ruby without sudo permission ( unless you use rvmsudo ) .
installing RVM is straight forward just copy and paste code from http://rvm.io and copy and paste code from website

\curl -sSL https://get.rvm.io | bash -s stable

after installation just restart your terminal and type type rvm | head -n 1 if it prints rvm is a function then everything is fine.
then you can install ruby easily just by typing

rvm install ruby-head

then just wait it will install the required dependencies etc .

Useful Links :

Tagged With : -
Add Comment