LoginSignup
0
0

Mac(M2)でmysql2のinstallで泣きそうになった話し

Last updated at Posted at 2024-02-10

Mac(M2)で、RoRの開発環境をローカルにとりあえず準備しようとしたらハマった。
mysql2がinstallできなくて泣きそうだったという話し。

PATHの問題なんだろなと思って、下記を参考に試したらできた。

下記が実行と結果。

❯ gem install mysql2 -- \
--with-mysql-lib=$(brew --prefix mysql)/lib \
--with-mysql-dir=$(brew --prefix mysql) \
--with-mysql-config=$(brew --prefix mysql)/bin/mysql_config \
--with-mysql-include=$(brew --prefix mysql)/include

Building native extensions with: '--with-mysql-lib=/opt/homebrew/opt/mysql/lib --with-mysql-dir=/opt/homebrew/opt/mysql --with-mysql-config=/opt/homebrew/opt/mysql/bin/mysql_config --with-mysql-include=/opt/homebrew/opt/mysql/include'
This could take a while...
Successfully installed mysql2-0.5.6
Parsing documentation for mysql2-0.5.6
Done installing documentation for mysql2 after 0 seconds
1 gem installed
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0