読者です 読者をやめる 読者になる 読者になる

ログってなんぼ

日々のメモです

Sierra/El Capitanでgem install時に「'openssl/ssl.h' file not found」エラーとなる

ruby infra

Sierra/El Capitanでgem install eventmachineを実行時に下記エラー

compiling binder.cpp
In file included from binder.cpp:20:
./project.h:103:10: fatal error: 'openssl/ssl.h' file not found
#include <openssl/ssl.h>
         ^
1 error generated.

github.com

ということで

$ gem install eventmachine -v '0.12.10' -- --with-cppflags="-I$(brew --prefix openssl)/include" --with-ldflags="-L$(brew --prefix openssl)/lib"

Building native extensions with: '--with-cppflags=-I/usr/local/opt/openssl/include --with-ldflags=-L/usr/local/opt/openssl/lib'
This could take a while...
Successfully installed eventmachine-0.12.10
1 gem installed