Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update Ruby with Homebrew?

I want to know how to update to the latest stable version of Ruby with Homebrew. I am not interested in using RVM. Thanks.

like image 758
Ralph David Abernathy Avatar asked Apr 07 '16 19:04

Ralph David Abernathy


People also ask

How do I upgrade my Ruby-build?

To update ruby-build simply cd into the folder with cd ~/. rbenv/plugins/ruby-build and pull the latest version by running git pull . Once the pull request is complete, you should be able to run rbenv install -l and see a list of the latest Ruby versions available for you to install.


2 Answers

I would use ruby-build with rbenv. The following lines install Ruby 3.1.0 and set it as your default Ruby version:

$ brew update $ brew install ruby-build $ brew install rbenv  $ rbenv install 3.1.0 $ rbenv global 3.1.0 
like image 80
spickermann Avatar answered Sep 24 '22 23:09

spickermann


brew upgrade ruby

Should pull latest version of the package and install it.

brew update updates brew itself, not packages (formulas they call it)

like image 25
Gustavo Rubio Avatar answered Sep 23 '22 23:09

Gustavo Rubio