I get an error every time in my local environment so make a note of the solution
$ bundle install --path vendor/bundle
...
Error statement ↓
An error occurred while installing mysql2 (0.5.3), and Bundler cannot continue.
$ bundle config --local build.mysql2 "--with-ldflags=-L/usr/local/opt/openssl/lib"
$ bundle install --path vendor/bundle
When the above command is executed, the following line will be added to .bundle / config
BUNDLE_BUILD__MYSQL2: "--with-ldflags=-L/usr/local/opt/openssl/lib"
Will come to be.
Recommended Posts