I\'m setting up my development environment in the new macOS Sierra .
First of all, I installed Rbenv, Ruby (2.3.1)
Here's what worked for me.
Originally I ran:
$ bundle config --local build.mysql2 "--with-ldflags=-L/usr/local/opt/openssl/lib --with-cppflags=-I/usr/local/opt/openssl/include"
then
$ bundle install
I received an error in /Users/.../.bundle/ruby/2.5.0/extensions/x86_64-darwin-18/2.5.0/mysql2-0.5.3/mkmf.log :
clang: error: unsupported option '--with-cppflags=-I/usr/local/opt/openssl/include'
So I removed "--with-cppflags=-I/usr/local/opt/openssl/include"
Then ran:
$ bundle config --local build.mysql2 "--with-ldflags=-L/usr/local/opt/openssl/lib"
followed by:
$ bundle install
Which worked.