Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/★★★/.rvm/rubies/ruby-1.9.3-p385/bin/ruby extconf.rb --with-mysql-config=/usr/local/Cellar/mysql/5.5.20/bin/mysql_config
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/sanpeihiroki/.rvm/rubies/ruby-1.9.3-p385/bin/ruby
--with-mysql-config
extconf.rb:33:in ``': No such file or directory - /usr/local/Cellar/mysql/5.5.20/bin/mysql_config --cflags (Errno::ENOENT)
from extconf.rb:33:in `<main>'
Gem files will remain installed in /Users/★★★/.rvm/gems/ruby-1.9.3-p385/gems/mysql2-0.3.11 for inspection.
Results logged to /Users/★★★/.rvm/gems/ruby-1.9.3-p385/gems/mysql2-0.3.11/ext/mysql2/gem_make.out
An error occurred while installing mysql2 (0.3.11), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.3.11'` succeeds before bundling.
% sudo gem install mysql2
Building native extensions. This could take a while...
Successfully installed mysql2-0.3.11
1 gem installed
Installing ri documentation for mysql2-0.3.11...
Installing RDoc documentation for mysql2-0.3.11...
すると、インストールに成功した。
再度bundle installを行うと上手くいった。
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
h3pei
Ruby・Ruby on Rails を中心としたバックエンドが得意領域のソフトウェアエンジニアです。設計から実装まで含めてプロダクト開発が好きです。