Skip to content

Instantly share code, notes, and snippets.

@mchlggr
Forked from fernandoaleman/mysql2-m1.md
Created December 5, 2023 21:06
Show Gist options
  • Select an option

  • Save mchlggr/debf36194811eb4ad97af0b5f33c11c5 to your computer and use it in GitHub Desktop.

Select an option

Save mchlggr/debf36194811eb4ad97af0b5f33c11c5 to your computer and use it in GitHub Desktop.

Revisions

  1. @fernandoaleman fernandoaleman created this gist Nov 11, 2021.
    17 changes: 17 additions & 0 deletions mysql2-m1.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    # Problem

    Installing `mysql2` gem errors on m1 Mac.

    # Solution

    Make sure `mysql`, `openssl` and `zstd` are installed on Mac via Homebrew.

    ```
    brew install mysql openssl zstd
    ```

    Install `mysql2` gem.

    ```
    gem install mysql2 -v '0.5.3' -- --with-mysql-config=$(brew --prefix mysql)/bin/mysql_config --with-ldflags="-L$(brew --prefix zstd)/lib -L$(brew --prefix openssl)/lib" --with-cppflags=-I$(brew --prefix openssl)/include
    ```