Disclaimer
Cuz I mainly develop using python, so I am not sure the would this workaround give you a correct ruby env or just change the path and get rid of the warning
Background
In my case, I installed rvm
first, and then pyenv
later. The config for both of them will change $PATH
. From the warning, it seems that rvm always want to be the first in the path
$ echo $PATH
$HOME/.rvm/gems/ruby-2.6.3/bin: ......
But if you add eval "$(pyenv init -)"
as required by pyenv
, it will change your $PATH
to
$ echo $PATH
$HOME/.pyenv/shims:$HOME/.rvm/gems/ruby-2.6.3/bin: ......
My workaround
$ rvm use system
# Switch back to system ruby
$ rvm use ruby-2.6.3
# Switch to the version you need to use
rvm
will change the path to what it likes then you won't see the annoying warning again.