RVM + Zsh "RVM is not a function, selecting rubies with 'rvm use ...' will not work"
For me, I just had to add
source $HOME/.rvm/scripts/rvm
to my ~/.zshrc and it started working, after having the same error message as in this SO question.
Turns out that RVM was installed in the wrong place. When I had initially installed RVM I believe I did so with the sudo
command, which ran the multi-user install (installed to /usr/local/rvm
), and not the single user (should be in ~/.rvm/scrips/rvm
), which is why all the posted solutions were not working for me.
I had to uninstall RVM with rvm implode
. There were some permissions issues, so I had to manually go in and delete the files that could not be deleted. Ran the curl command to re-install RVM and now it's installed in the correct place.
Sourcing RVM in my .zshrc
with [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
now works properly and I can switch between rubies.
@trustkr's answer worked for me, but would like to add...
I ran into this issue immediately after install of rvm. In order for the
source
to work in in the ~/.zshrc file to work, you will need either start a new terminal session and work there OR you can run
source ~/.rvm/scripts/rvm
in the same terminal session in which you installed.
[Mac OS 10.10.5 - iTerm - zsh]