Install RVM on OS X with Brew
I had followed Darkoperator’s Metasploit Framework for Mountain Lion Guide back in July of 2012. After doing a ‘brew update && brew upgrade’ the recent stable release of ruby-2.0.0.p0 breaks ‘msfconsole’. A simply way to resolve this is to remove ruby from Homebrew and install RVM for ruby version management.
ruby -v brew doctor brew uninstall ruby brew remove --force ruby \curl -#L https://get.rvm.io | bash -s stable --ruby source /User/<account name>/.rvm/scripts/rvm cat ~/.bash_profile rvm install 1.9.3 rvm --default 1.9.3 rvm list ruby -v
Line 1 shows the current version of ruby. Run Line 2 to make sure ‘Your system is raring to brew.’ Line 3 uninstalls ruby and Line 4 removes the files from the ‘/usr/local/Cellar/’. Line 6 installs RVM with the latest stable version of Ruby. Line 7 loads RVM into the active shell session as a function (replace <account name> with your user account; if you’re not sure .. use ‘whoami’). Use Line 8 to check that RVM will loads automatically when you open a new terminal, otherwise you will have to run Line 7 each time:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
Line 10 installs ruby-1.9.3-p393 and the following line sets the current && default ruby version in the bash prompt to 1.9.3 with the last command verifying the current version of ruby.