I have not used ruby, vagrant, or rvm since upgrading to Yosemite last fall. But I now need to use Vagrant for a project so I ran the latest package installer and tried to run it. I got an error from ruby. I wasn't sure if rvm or something else had been mangled during the OSX upgrade, so first I tried installing the latest ruby from rvm, but that didn't solve my problem running Vagrant either, so then I uninstalled rvm and all of the rubies it knew. I should be back to plain vanilla OSX ruby. I then tried just testing ruby to see what would happen:
$> which ruby /usr/local/bin/ruby $> ruby -v ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.i386-darwin14] dyld: lazy symbol binding failed: Symbol not found: _ruby_run Referenced from: /usr/local/bin/ruby Expected in: /usr/lib/libruby.dylib dyld: Symbol not found: _ruby_run Referenced from: /usr/local/bin/ruby Expected in: /usr/lib/libruby.dylib Trace/BPT trap: 5
My problem with trying to run Vagrant seems to be that it looks for ruby at /usr/local/bin/ruby so any rvm ruby is not found and the system ruby is used. What is the dylib reference about? Years ago I installed MacPorts to get postresql, but that did not survive the upgrade either, at least the port command is gone and I've moved all the old files out of the way as suggested on their site as an uninstall. I hope that didn't impact things.
There are a few other questions here on this kind of failure that are similar, but all of them point to solutions that install rvm or MacPorts or HomeBrew or some other third party package. What I want is for the ruby that OSX installed to be available and working as it does on my wife's (non-developer) mac. I'm not a ruby developer, so I don't want to keep up with ruby and friends, I just want the default ruby for this machine to work as it should. If needed I can install rvm or similar later.
Any idea on how/why this is actually messed up? And more importantly, how do I get back to a working state so that ruby runs? Actually, is there a resource that describes how these things are arranged and configured as I suspect that whatever messed this up could show up in other areas.