gem install mysql2 -- --with-mysql-config=/usr/local/Cellar/mariadb/10.4.11/bin/mysql_config
If you want to avoid using MacPorts, you can download the Postgres App and place it into the Application directory.
Then, specify the location of newly downloaded pg_config
:
gem install pg -- --with-pg-config=/Applications/Postgres.app/Contents/Versions/latest/bin/pg_config
If you run in to missing headers problem, try specifying the include
directory of the app:
gem install pg -- --with-pg-include='/Applications/Postgres.app/Contents/Versions/latest/include/'
brew install libxml2
brew link --force libxml2
gem install libxml-ruby -- --with-xml2-config=/usr/local/opt/libxml2/bin/xml2-config --with-xml2-dir=/usr/local/opt/libxml2 --with-xml2-lib=/usr/local/opt/libxml2/lib --with-xml2-include=/usr/local/opt/libxml2/include
Ref: