DEV Community

Using MySQL with Rails 6 and installing MySQL on Mac (macOS Mojave)

Felice Forby on September 26, 2019

I recently had to switch databases from Sqlite to MySQL after already creating a Rails app. I also had to install MySQL on my Mac. This article go...
Collapse
 
luciagirasoles profile image
Mayra Navarro • Edited

Thank you!
I had to run:
brew reinstall openssl && brew link openssl --force
bundle config --local build.mysql2 "--with-ldflags=-L/usr/local/opt/openssl/lib --with-cppflags=-I/usr/local/opt/openssl/include"


Just in case someone needs it in the future

Collapse
 
morinoko profile image
Felice Forby

Thanks for your extra bit of info! <3

Collapse
 
bastianhilton profile image
Sebastian hilton

thanks so much for the detail post on how to create a project with mysql, how to add to existing and adding so much details. Don't find to many articles like this from the tech community. Definetly adding to my faves.

Collapse
 
priteshjain profile image
Pritesh Jain

Saved my day!! Specially the installer once.
thanks

Collapse
 
morinoko profile image
Felice Forby

Yay! Glad it helped!