There are a few different ways that you can do that.
Your project may depend upon having certain versions of Ruby, so it's better if we can control and manage our own version of Ruby, and that's what we're going to see how to do. It's great to have that version of System Ruby there to get us started, but it's also not a great idea to rely on it, after all, if Apple updates the operating system, the version of Ruby that's included would be upgraded as well, and that may not be something that you want to do. There may not be a system, you may have to install something to begin with. It is notable that that in the macOS Catalina release notes, Apple warns that future versions of the operating system may not include Ruby by default. This is also referred to as System Ruby, a version of Ruby that Apple provides with the operating system. And that would certainly be new enough to use with Ruby on Rails 6. If you're using macOS Catalina or later, then you should have Ruby 2.6.3, that's what's installed by default. Ruby on Rails 6 requires Ruby version 2.5 or later. Once we have Homebrew installed, the next step is to ensure that we have a compatible version of Ruby that we can use with Ruby on Rails.