modified for homebrewed rbenv