Open your terminal and run

curl -sSL https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer | bash -s stable

For the rvm command to work, you need to run:

source ~/.rvm/scripts/rvm

Now, run rvm list known

This shows the list of versions of the Ruby interpreter.

Now, run rvm install ruby@latest to get the latest Ruby version.

If you type ruby -v in the terminal, you should see ruby X.X.X.

If it still shows you ruby 2.0., run rvm use ruby-X.X.X --default.

Prerequisites for Windows 10:

  • C compiler. You can use http://www.mingw.org/
  • make command available otherwise it will complain that "bash: make: command not found". You can install it by running mingw-get install msys-make
  • Add "C:\MinGW\msys\1.0\bin" and "C:\MinGW\bin" to your path environment variable
Answer from Abhinay Reddy Keesara on Stack Overflow
🌐
Ruby
ruby-lang.org › en › documentation › installation
Installing Ruby | Ruby
RVM allows you to install and manage multiple installations of Ruby on your system. It can also manage different gemsets. It is available for macOS, Linux, or other UNIX-like operating systems.
Top answer
1 of 16
954

Open your terminal and run

curl -sSL https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer | bash -s stable

For the rvm command to work, you need to run:

source ~/.rvm/scripts/rvm

Now, run rvm list known

This shows the list of versions of the Ruby interpreter.

Now, run rvm install ruby@latest to get the latest Ruby version.

If you type ruby -v in the terminal, you should see ruby X.X.X.

If it still shows you ruby 2.0., run rvm use ruby-X.X.X --default.

Prerequisites for Windows 10:

  • C compiler. You can use http://www.mingw.org/
  • make command available otherwise it will complain that "bash: make: command not found". You can install it by running mingw-get install msys-make
  • Add "C:\MinGW\msys\1.0\bin" and "C:\MinGW\bin" to your path environment variable
2 of 16
370

Homebrew-only solution

A better solution

From the comments (kudos to Maksim Luzik), what seems like a more elegant solution:

After installing Ruby through brew, run the following command to update the links to the latest Ruby installation: brew link --overwrite ruby --force

Reopen a terminal to reset zshrc. Check the installlation with ruby --version and gem --version, then run gem install bundler.

Earlier solution

Using brew is enough. It's not necessary to install rvm and for me it just complicated things.

By brew install ruby you're actually installing the latest (currently v2.4.0). However, your path finds 2.0.0 first. To avoid this just change precedence (source). I did this by changing ~/.profile and setting:

export PATH=/usr/local/bin:$PATH

After this, I found that the bundler gem was still using version 2.0.0. Just install it again: gem install bundler

Discussions

System ruby on mac
If you're using system ruby you can just install rbenv over it and use that to keep your ruby install up to date. https://github.com/rbenv/rbenv More on reddit.com
🌐 r/ruby
8
2
June 13, 2024
How can I update my Ruby version on macOS from 2.0.0 to the latest release? - Ask a Question - TestMu AI Community
I originally installed Ruby using Homebrew a while back, but I’m not sure what the best or safest way is now to update ruby version mac without breaking my existing setup. I’ve seen a few different approaches mentioned (Homebrew, version managers, etc.), and I’m a bit unsure which one ... More on community.testmuai.com
🌐 community.testmuai.com
0
December 22, 2025
How to install ruby on macOS - rubyonrails-talk - Ruby on Rails Discussions
I’ll second RVM. It’s old but it works and is still being updated with the latest rubies · I think asdf looks like a newer option that handles more than just ruby, but I haven’t used it yet because I only use ruby lately · I would say that if you are going to go with RVM, I would skip ... More on discuss.rubyonrails.org
🌐 discuss.rubyonrails.org
0
September 22, 2024
How do I upgrade from 2.3.7 to 2.7.4 on macOS and Linux?
You want to use a tool to manage your ruby versions. RVM is the classic, though many consider it heavy, and dislike that it patches cd. rbenv is a popular alternative. chruby I believe to be the lightest of the tools. I personally use ASDF because it is language agnostic. I manage my python, ruby, elixir, and erlang versions with this one tool. More on reddit.com
🌐 r/ruby
6
6
October 14, 2021
🌐
Mac Install Guide
mac.install.guide › ruby › update
Update Ruby on Mac · Ruby 4.0 · Mac Install Guide
December 26, 2022 - Update Ruby on Mac. Install Ruby 4.0, the current Ruby version. How to update the Ruby version on macOS. How to download and upgrade Ruby with rbenv, rvm, or newer version managers.
🌐
DEV Community
dev.to › luizgadao › easy-way-to-change-ruby-version-in-mac-m1-m2-and-m3-16hl
Easy way to change Ruby version in Mac, M1, M2 and M3 - DEV Community
June 21, 2024 - I had some problems updating and installing Ruby on my Mac, which made it difficult to configure essential tools like CocoaPods for my daily work. Here's a guide to help you change your Ruby version easily.
🌐
Reddit
reddit.com › r/ruby › system ruby on mac
r/ruby on Reddit: System ruby on mac
June 13, 2024 -

I was trying to update my flutter setup and I saw that I need to update my ruby.

I then saw that I shouldn't use the system ruby.

How can I know if I f'ed up and did something wrong? Is there a way to revert any changes I did to that?

🌐
Ruby on Mac
rubyonmac.dev › how-to-upgrade-the-ruby-version-in-your-project
How and Why to Upgrade the Ruby Version in Your Project | Ruby on Mac
3 weeks ago - If you’re a Ruby on Mac customer using the default settings, you would run chruby followed by the version number. ... If you get any errors during bundle install, you might need to update the gems that are causing the errors.
Find elsewhere
🌐
Delft Stack
delftstack.com › home › howto › ruby › update ruby version in macos
How to Update Ruby Version in macOS | Delft Stack
March 11, 2025 - Can I have multiple Ruby versions installed on macOS? Yes, using tools like Rbenv or RVM allows you to manage and switch between multiple Ruby versions easily. Is Homebrew necessary for updating Ruby? While Homebrew simplifies the installation process, it’s not strictly necessary.
🌐
Railsup
railsup.io › blogs › how-to-update-ruby-version-in-mac
How to Update Ruby Version in Mac - RailsUp.io
If you’re working on Ruby projects in macOS, it’s crucial to ensure your development environment is using an up-to-date version of Ruby. This guide will walk you through exactly how to update Ruby on Mac, step-by-step, whether you're working on new projects or trying to revive legacy code.
🌐
Ruby on Mac
rubyonmac.dev › how-to-install-ruby-2-6-on-macos-13-ventura
How to Install Ruby 2.6.x on macOS (Tahoe, Sequoia, Sonoma) | Ruby on Mac
3 weeks ago - For example, if your project is currently using Ruby 2.6.6, or any version of 2.6 lower than 2.6.10, the first thing I recommend you do is update it to at least 2.6.10. As I explain in my guide about how and why to upgrade the Ruby version in your project, it rarely makes sense to use a Ruby version where the 3rd digit is not the latest one. Another reason for upgrading to 2.6.10 is that it is MUCH easier to safely install 2.6.10 on an Apple Silicon Mac than versions older than 2.6.8, which require Rosetta.
🌐
GitHub
collectionbuilder.github.io › cb-docs › docs › software › ruby_mac
Mac - Ruby Install | CollectionBuilder Documentation
To update your Ruby version on Mac, you will want to start by updating rbenv using: brew upgrade rbenv ruby-build.
🌐
Mac Install Guide
mac.install.guide › ruby
Install the Latest Ruby Version · Ruby 4.0 · Mac Install Guide
How to install the latest Ruby version. Download Ruby 4.0. Use Homebrew, Mise, or rv to install and manage Ruby versions.
🌐
Ruby on Mac
rubyonmac.dev
Ruby on Mac: Get Ruby working on your Mac in minutes with a single command.
Each time you run Ruby on Mac, it will check to see if there's a new version available. If so, it will prompt you to update, and if you say yes, it will automatically download and install the latest version for you.
🌐
TestMu AI Community
community.testmuai.com › ask a question
How can I update my Ruby version on macOS from 2.0.0 to the latest release? - Ask a Question - TestMu AI Community
December 22, 2025 - I’m currently running an older Ruby version (2.0.0) on my Mac (macOS Yosemite), and I’m starting to hit issues where certain gems won’t install or work because my Ruby version is too outdated. I originally installed Rub…
🌐
Medium
olivierpicault.medium.com › change-ruby-version-on-mac-os-98c800a85d6d
Change ruby version on Mac OS X. I know there is a ton of documentation… | by Olivier Picault | Medium
November 16, 2023 - Change ruby version on Mac OS X I know there is a ton of documentation but after reading them, StackOverflow posts and other shady blog posts, I decided to come up with what worked for me so if I or …
🌐
GitHub
gist.github.com › wrburgess › a6fc079cee6f14fc601b
Updating Ruby with rvm or rbenv on a Mac · GitHub
Updating Ruby with rvm or rbenv on a Mac. GitHub Gist: instantly share code, notes, and snippets.
🌐
Stackify
stackify.com › install-ruby-on-your-mac-everything-you-need-to-get-going
Install Ruby on Your Mac: Everything You Need to Get Going - Stackify
May 22, 2024 - Learn how to effortlessly install Ruby on your Mac with detailed, step-by-step instructions to write your first Ruby program.
🌐
GitHub
github.com › rbenv › rbenv
GitHub - rbenv/rbenv: Manage your app's Ruby environment · GitHub
On macOS or Linux, we recommend installing rbenv with Homebrew. ... [!CAUTION] The version of rbenv that is packaged and maintained in official Debian and Ubuntu repositories is out of date.
Starred by 16.7K users
Forked by 1.4K users
Languages   Shell 97.8% | Ruby 1.6%
🌐
Moncef Belyamani
moncefbelyamani.com › how-to-install-xcode-homebrew-git-rvm-ruby-on-mac
The fastest and easiest way to install Ruby on a Mac in 2026
March 17, 2026 - Click on the Apple icon at the top left of your Mac, and click on System Settings. ... If necessary, make the window larger by dragging its bottom edge until you see the “Options” button on the bottom right side ...
🌐
Ruby on Rails
discuss.rubyonrails.org › rubyonrails-talk
How to install ruby on macOS - rubyonrails-talk - Ruby on Rails Discussions
September 22, 2024 - I’ll second RVM. It’s old but it works and is still being updated with the latest rubies · I think asdf looks like a newer option that handles more than just ruby, but I haven’t used it yet because I only use ruby lately · I would say that if you are going to go with RVM, I would skip ...