Install Xcode. Be sure to open it once an install the additional components.
Install Homebrew.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
If the project is going to use the pg gem install Postgresql.
brew install postgresql
Install Ruby Version Manager. Be sure to follow the instructions the installer provides to insure that rvm is in your PATH.
\curl -sSL https://get.rvm.io | bash -s stable
Install the Ruby version desired, in this example 2.6.
rvm install 2.6
Create a gemset to use for your Rails project.
rvm gemset create my_awesome_project
Use the newly created gemset.
rvm gemset use my_awesome_project
Change into the root of your Rails project and install the bundle.
bundle install
Run migrations.
rails db:migrate
or for older Rails apps use rake.
rake db:migrate