Today I upgraded to Ruby 2.1.3 from 2.0.0 on Mac OSx 10.9.5. It turned out to be more difficult than initially expected. And since I wasted a hell lot of time I thought I share my experiences plus solution in case someone else hits the problem as well.
I have xcode + developer tools installed. I updated xcode this week as well - not sure if that was the reason why things suddenly didn't work. However, here are the facts:
$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.51) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix
$ rvm -v
rvm 1.25.32 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
$ brew -v
Homebrew 0.9.5
$ git version
git version 1.9.3 (Apple Git-50)
Getting the latest version of Ruby and using it as default:
$ rvm install ruby
$ rvm --default use ruby-2.1.3
Now the issue is that if I tried to check ruby version I got the following:
$ rvm --default use ruby-2.1.3
Using /Users/georg/.rvm/gems/ruby-2.1.3
dyld: Library not loaded: /usr/local/lib/libgmp.10.dylib
Referenced from: /Users/georg/.rvm/rubies/ruby-2.1.3/bin/ruby
Reason: image not found
In fact nothing was really working - I tried to reload RVM, reinstall, re-install and upgrade homebrew, etc.
$ brew update && brew upgrade
$ rvm reload
Reinstalled ruby
$ rvm install ruby-2.1.3
Already installed ruby-2.1.3.
To reinstall use:
rvm reinstall ruby-2.1.3
And many other solutions - however, it all did not do the trick.
So I checked if I have /usr/local/lib/libcloog-isl.4.dylib
$ ls -la /usr/local/lib/libcloog-isl.4.dylib
Which didn't give anything back ...