akzahq
Last Updated: March 04, 2016
·
258
· flexbox

Configure your bundler for the gem eventmachine on OSX El Capitain

A long time ago I have install my machine with GitHub Boxen.

Since I have bump to OSX El Capitain, — I don't know why but — I have an issue with the gem eventmachine with every bundle install on all my projects.

An error occurred while installing eventmachine (1.0.3), and Bundler cannot continue.
Make sure that `gem install eventmachine -v '1.0.3'` succeeds before bundling.

After reading the stdout I have notice :

Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries

Hummmm I see… so there is a problem with openssl

$ brew info openssl

I have to install eventmachine with a particular flag

$ gem install eventmachine -- --with-cppflags=-I/opt/boxen/homebrew/opt/openssl/include

Problem You have to do it everytime.
BUT you can configure your bundler

$ bundle config build.eventmachine --with-cppflags=-I/usr/local/opt/openssl/include

OR for boxen users

$ bundle config build.eventmachine --with-cppflags=-I/opt/boxen/homebrew/opt/openssl/include