Skip to content

Instantly share code, notes, and snippets.

@joelcahalan
Last active August 10, 2022 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joelcahalan/ec60393ae98332aa77e20b03815537de to your computer and use it in GitHub Desktop.
Save joelcahalan/ec60393ae98332aa77e20b03815537de to your computer and use it in GitHub Desktop.
see https://github.com/brianmario/mysql2/issues/1250#issuecomment-1075672620
brew update --preinstall
brew install openssl@1.1
export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib"
export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include"
export PKG_CONFIG_PATH="/usr/local/opt/openssl@1.1/lib/pkgconfig"
And adding the following line, as the last statement in ~/.zshrc:
export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"
gem install mysql2 -- --with-opt-dir=/usr/local/opt/openssl@1.1 –with-mysql-dir=/usr/local/opt/mysql
or possibly when less thant ruby 3
gem install mysql2 --version '0.5.3' -- --with-opt-dir=ls -l /usr/local/Cellar/openssl@1.1/1.1.1m/lib --with-cppflags=-I/usr/local/Cellar/openssl@1.1/1.1.1m/include
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment