This is the quickest/easiest way I can see for someone running macOS to get up and running with Ruby on Rails assuming they are starting with a blank slate.
I’m sharing it here for future reference;
curl -L https://get.rvm.io | bash
source "/Users/your-username/.rvm/scripts/rvm"
rvm get stable
rvm reload
rvm install 3.4.5 (this might take some time)
gem install rails
Now you are ready to call rails new my_awesome_app.
To go into a little more detail;
I’m using RVM here, other people like other ways of manaying Ruby, but I’ve always had good success with RVM.
Once installed, you update its internal database with rvm get stable, and you
install the version of Ruby you want with rvm install 3.4.5
gem install rails will install the latest version of Rails, which is normally
what you want for a new project.