0

When I run rvm use 1.9.3,it shows rvm is not a function. Then I add [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm", and run source .zshrc, it shows /home/lct/.rvm/scripts/cli:240: parse error near `-i', rvm is still not a function.

Leo_vim
  • 13
  • 4

3 Answers3

1

update your rvm with:

curl -L get.rvm.io | bash -s stable --auto

instead of adding sourcing to .zshrc you should enable login shell in your terminal, here is a example: https://rvm.io/integration/gnome-terminal/

mpapis
  • 52,729
  • 14
  • 121
  • 158
0

If zsh is not the login shell or you haven't tried "source rvm/scripts/rvm", search for other questions solved before, there's too many answers for it. But if that NOT fixes, see below:

I've experienced a parse error too. But maybe not the same line in the script. This error usually means there's some conflict in your original zshrc configuration and rvm scripts. Try comment some part of your zshrc file until the error disappears.

halfelf
  • 9,737
  • 13
  • 54
  • 63
0

This is the line that I currently use at .zshrc :

source ~/.rvm/scripts/rvm

raulricardo21
  • 2,499
  • 4
  • 20
  • 27