久々にRailsプロジェクトをBundle Installしようとしたらmysqlで怒られた
Using rb-inotify 0.9.5
Using sprockets 2.12.4
Using crack 0.4.2
Using debase 0.2.1
Using did_you_mean 0.10.0
Using notiffany 0.0.7
Using pry 0.10.3
Using guard-minitest 2.4.6
Using omniauth 1.3.1
Using hirb-unicode 0.0.5
Using mocha 1.1.0
Using minitest-reporters 1.0.20
An error occurred while installing mysql2 (0.3.16), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.3.16'` succeeds before bundling.
GemFileにてバージョンを指定したが、変わらず
gem 'mysql2', '0.3.16'
調べてみると以下のようにBundleのconfigを設定したところ無事インストールできました。
Rails使ったことないので無駄にはまってしまった。
最近クライアントばかりやっているのでやばい。ちょっと勉強します
bundle config --local build.mysql2 "--with-ldflags=-L/usr/local/opt/openssl/lib --with-cppflags=-I/usr/local/opt/openssl/include"