LoginSignup
1
0

More than 5 years have passed since last update.

Bundle install でMySQLのインストールに失敗した話

Posted at

久々にRailsプロジェクトをBundle Installしようとしたらmysqlで怒られた:imp:

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"
1
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
1
0