Skip to content

Instantly share code, notes, and snippets.

@manhdaovan
Last active February 15, 2021 05:38
Show Gist options
  • Select an option

  • Save manhdaovan/b2450500c52000ffe210becb9a0de551 to your computer and use it in GitHub Desktop.

Select an option

Save manhdaovan/b2450500c52000ffe210becb9a0de551 to your computer and use it in GitHub Desktop.
Install mysql2 gem on MacOS catalina (10.15.x)
  • install xcode command line:
    • xcode-select --install
  • install mysql
    • brew install mysql@5.7 (i dont want to install mysql 8)
  • export some compiling flag: (as show in brew info mysql@5.7
    • export LDFLAGS="-L/usr/local/opt/mysql@5.7/lib"
    • export CPPFLAGS="-I/usr/local/opt/mysql@5.7/include"
    • export PKG_CONFIG_PATH="/usr/local/opt/mysql@5.7/lib/pkgconfig"
  • bundle install again
    • bundle install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment