Inspect or clean up the working tree error when installing Ruby 2.1.3 on Mac OS X 10.9.5
Did you try this:
CC=/usr/bin/gcc rbenv install 2.1.3
From this SO answer: Unable to build Ruby 2.1.3 on OSX 10.10 GM 3.0 with rbenv
I had to remove the existing openssl
that came with macOS and instead install from brew with brew install openssl
.
NOTE: I also had to disable SIP with csrutil disable
and then remount root with writable permissions, with sudo mount -uw /
.