Моя система Mac OS - Majove.
Получено исключение, и ни одна из приведенных ниже команд не может заставить его работать.
12163 bundle config --local build.mysql2 "--with-ldflags=-L/usr/local/opt/openssl/lib --with-cppflags=-I/usr/local/opt/openssl/include"
12166 gem install mysql -- \ --with-mysql-config=/usr/local/bin/mysql_config
12167 brew install mysql-connector-c
12168 gem install mysql2 -- \ --with-mysql-config=/usr/local/mysql/bin/mysql_config
12169 gem install mysql2 -- --with-mysql-dir=/usr/local/opt/mysql/
12172 brew install openssl libyaml libffi
12173 RUBY_CONFIGURE_OPTS=--with-openssl-dir=/opt/local rbenv install 2.4.3
12184 RUBY_CONFIGURE_OPTS=--with-openssl-dir=/opt/local rbenv install 2.3.7
12194 gem install mysql2 -v '0.5.2' -- --with-ldflags=-L/usr/local/opt/openssl/lib --with-cppflags=-I/usr/local/opt/openssl/include
12195 bundle config build.mysql2 --with-opt-dir=/usr/local/opt/openssl
12196 gem install atomic
12197 brew install libiconv && xcode-select --install
12198 bundle config build.mysql2 --with-opt-dir=/usr/local/opt/openssl
Исключение
checking for rb_wait_for_single_fd()... yes
checking for -lmysqlclient... no
-----
mysql client is missing. You may need to 'brew install mysql' or 'port install mysql', and try again.
-----
*** 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
--without-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/poc/.rbenv/versions/2.4.3/bin/$(RUBY_BASE_NAME)
--with-mysql-dir
--without-mysql-dir
--with-mysql-include
--without-mysql-include=${mysql-dir}/include
--with-mysql-lib
--without-mysql-lib=${mysql-dir}/lib
--with-mysql-config
--without-mysql-config
--with-mysql-dir
--without-mysql-dir
--with-mysql-include
--without-mysql-include=${mysql-dir}/include
--with-mysql-lib
--without-mysql-lib=${mysql-dir}/lib
--with-mysqlclientlib
--without-mysqlclientlib