我想知道如何更新到最新的 稳定版本的 Ruby 与家酿。我是 没有感兴趣的使用 RVM。谢谢。
I would use ruby-build with rbenv. The following lines install Ruby 3.1.3 and set it as your default Ruby version:
ruby-build
rbenv
$ brew update $ brew install ruby-build $ brew install rbenv $ rbenv install 3.1.3 $ rbenv global 3.1.3
brew upgrade ruby
Should pull latest version of the package and install it.
brew update updates brew itself, not packages (formulas they call it)
brew update
Adding to the selected answer (as I haven't enough rep to add comment), one way to see the list of available versions (from ref) try:
$ rbenv install -l
To upgrade Ruby with rbenv: Per the rbenv README
brew upgrade rbenv ruby-build
rbenv install -l
rbenv install <selected version>
open terminal
\curl -sSL https://get.rvm.io | bash -s stable
restart terminal then
rvm install ruby-2.4.2
check ruby version it should be 2.4.2