“RVM is not a function” error

后端 未结 10 1797
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-30 22:22

RVM is installed on my machine (running Mac OSX 10.6.8), correctly and it runs fine. The odd thing is that to run it, I have to use source ~/.rvm/scripts/rvm for ev

10条回答
  •  暖寄归人
    2021-01-30 22:35

    If you are using zsh as shell instead bash, you have to:

    1.

    vi ~/.zshrc 
    

    2. Like Matt said, add:

    if test -f ~/.rvm/scripts/rvm; then
       [ "$(type -t rvm)" = "function" ] || source ~/.rvm/scripts/rvm
    fi
    

    3. Restart Terminall 4. Done!

    rvm use 1.9.3
    

    Wil work

提交回复
热议问题