I'm trying to install Ruby 2.1.3 on Mac OS X 10.9.5 using the rbenv install 2.1.3 command. However I get the error message below. I tried every suggestion on stack overflow and elsewhere. Nothing seems to be working. I currently have the original ruby version that came with 10.9.5, Ruby 2.1.3p242. Brew doctor says everything is fine and rbenv is up to date. Thanks so much! Trying to learn Ruby and Ruby on Rails but I can't get passed this stage.
Inspect or clean up the working tree at /var/folders/zg/s1jqg94n0hjggdnmb442n2lc0000gn/T/ruby-build.20141025184549.88303
Results logged to /var/folders/zg/s1jqg94n0hjggdnmb442n2lc0000gn/T/ruby-build.20141025184549.88303.log
Last 10 log lines:
linking shared-object openssl.bundle
installing default openssl libraries
compiling raddrinfo.c
compiling ifaddr.c
installing default socket libraries
compiling init.c
compiling constants.c
linking shared-object socket.bundle
linking shared-object ripper.bundle
make: [build-ext] Error 2
brew upgrade openssland thenrbenv install 2.1.3. If that doesn't work, there is a similar issue on Github (filed for Yosemite, but might be worth a try) — (2) either setCC=/usr/bin/gccorCC=clangand thenrbenv install 2.1.3. Hope it helps.brew upgrade readlinethenrbenv install 2.1.3. Hopefully someone else will chime in if that doesn't work. Also might be worth filing an issue on the ruby-build repo — they seem to be pretty responsive and patient with figuring what exactly is going wrong.rbenvitself. If you are usinghomebrew:brew updatebrew upgrade ruby-buildbrew upgrade rbenvrbenv install 2.1.3.