I’m running Ruby 1.9.2 w/ rbenv. I recently moved my Users directory to a different drive. Ruby and irb show up using which.
$ which ruby
/Volumes/Pig/Users/arrow/.rbenv/shims/ruby
$ which irb
/Volumes/Pig/Users/arrow/.rbenv/shims/irb
However, running irb hangs indefinitely.
I’ve also been running ruby files under the current config but executing $ ruby -v also hangs.
rbenv rehashcan help solve these sort of problems. Anytime you modify your Ruby installation you need to rerun that command to let rbenv rebuilt its soft-links.From the command-line output:
You might also need to tell rbenv where your binaries are again, i.e.,
rbenv global 1.9.2...and let it adjust things.Remember, rbenv assumed your binaries were on a different volume so it might have gotten confused and needed you to straighten it out.
The other issue could be that Ruby bound to files on the other volume at compile time (because that’s what rbenv does, it compiles Ruby for you) so when the files couldn’t be found the apps crashed. Reinstalling rbenv would fix that, as telling it to reinstall a particular Ruby should have fixed it.