Install Brew On Mac Catalina

Install Brew On Mac Catalina

Setting Up A Database

Brew Install Mysql Mac Catalina

Install with a version manager such as asdf, chruby, rbenv, or rvm if you need to switch among Ruby versions (instructions for rbenv are below). See the guide Install Ruby on Mac for details and recommendations. To run the latest Ruby version you need to install it through Homebrew. In order to install Homebrew on macOS Catalina, you must have Xcode installed. You can get it from the Mac App Store. The app is large and for some reason, it downloads really slow when you get it from the Mac App store so you’re in for a little wait. Once it’s installed, you also need to install Command Line tools for it.

We're going to install sqlite3 from homebrew because we can't use the built-in version with macOS Sierra without running into some troubles.

Brew

Rails ships with sqlite3 as the default database. Chances are you won't want to use it because it's stored as a simple file on disk. You'll probably want something more robust like MySQL or PostgreSQL.

There is a lot of documentation on both, so you can just pick one that seems like you'll be more comfortable with.

If you're new to Ruby on Rails or databases in general, I strongly recommend setting up PostgreSQL.

If you're coming from PHP, you may already be familiar with MySQL.

MySQL

Mac

You can install MySQL server and client from Homebrew:

InstallInstall

Once this command is finished, it gives you a couple commands to run. Follow the instructions and run them:

By default the mysql user is root with no password.

When you're finished, you can skip to the Final Steps.

PostgreSQL

Brew Install Openssl Mac Catalina

You can install PostgreSQL server and client from Homebrew:

Once this command is finished, it gives you a couple commands to run. Follow the instructions and run them:

Install Brew On Mac Catalina Download

By default the postgresql user is your current OS X username with no password. For example, my OS X user is named chris so I can login to postgresql with that username.