I’m on El Capitan. It could be that I installed brew, rbenv and rvm in some earlier iteration of the OS and forgot about it. At any rate, all are installed. The system has a Ruby folder under /Library with 2.0.0 located there. At the point of the book where I try to execute the command ‘brew install rbenv ruby-build’ (which I don’t know whether I need to do or not), I get an error: /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require’: cannot load such file – mach (LoadError) Executing ruby -v says I’m running 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin14] If I execute ‘which ruby’, I get /Users/myUser/.rbenv/shims/ruby That makes me think that rbenv is determining the version of ruby that should be executed. If I execute ‘rbenv install 2.3.1’ I’m told that there’s no definition found for 2.3.1. It says to run rbenv install –list, so I do, and, indeed, 2.3.1 is not in the list. The last 2.3 is 2.3.0-dev. It says if the version you need is missing, try upgrading ruby-build by executing ‘brew update && brew upgrade ruby-build’. I do, and I get the error indicating that brew update fails because of of the first error above, i.e., cannot load file – mach (LoadError). Do you know how can I get rid of all of this and start from a clean slate? Or any other advice for me? (Short of re-installing the OS from scratch.)
I found a web page that talked about something sort of similar and it said to do the following: ~~~ sudo chown -R $USER:admin /usr/local cd /usr/local git reset –hard origin/master brew update ~~~ After executing these commands, I was able to execute ‘brew upgrade ruby-build, then install 2.3.1.