aadeshere1.github.io
aadeshere1.github.io copied to clipboard
2024/12/10/fixing-zstd-library-not-found-issue-when-installing-mysql-gem-on-mac
Fixing zstd library not found issue when installing mysql gem on mac
Thanks for it
Thank you very much for this!
Just to add — we can also use the following command, which includes both OpenSSL and Zstd via --with-opt-dir:
gem install mysql2 -v '0.5.6' -- --with-opt-dir="$(brew --prefix openssl):$(brew --prefix zstd)"
And to make it work across all projects and Ruby versions on your machine, you can add it to your global Bundler config:
bundle config --global build.mysql2 "--with-opt-dir=$(brew --prefix openssl):$(brew --prefix zstd)"