Installed latest ruby but still showing old version
I have installed latest ruby version on mac ventura and getting success message
Successfully installed ruby 3.2.2 into /Users/myuser/.rubies/ruby-3.2.2
But when checking ruby --version on the same or new terminal Then i am still getting old one ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin22]
i have exported below files in bash_profile
source /opt/homebrew/opt/chruby/share/chruby/chruby.sh
source /opt/homebrew/opt/chruby/share/chruby/auto.sh
export PATH=/usr/local/opt/ruby/bin:$PATH
Can anyone please suggest why the latest version is not reflecting on search ruby --version.
On search, "ruby --version" we should get latest installed ruby 3.2.2 but still showing 2.6
As suggested by @mechnicov in the comments, it is recommended to alter the system ruby. you can use the
asdfpackage manager for it. here is the installation guide link