An error occurred while installing eventmachine

Installing eventmachine gem and suddenly you get this error 'Gem::Ext::BuildError: ERROR: Failed to build gem native extension.'?

checking for rb_trap_immediate in ruby.h,rubysig.h... no  
checking for rb_thread_blocking_region()... no  
checking for ruby/thread.h... yes  
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes  
checking for inotify_init() in sys/inotify.h... no  
checking for __NR_inotify_init in sys/syscall.h... no  
checking for writev() in sys/uio.h... yes  
checking for rb_thread_fd_select()... yes  
checking for rb_fdset_t in ruby/intern.h... yes  
checking for rb_wait_for_single_fd()... yes  
checking for rb_enable_interrupt()... no  
checking for rb_time_new()... yes  
checking for sys/event.h... yes  
checking for sys/queue.h... yes  
checking for clock_gettime()... no  
checking for gethrtime()... no  
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="  
compiling binder.cpp  
In file included from binder.cpp:20:  
./project.h:116:10: fatal error: 'openssl/ssl.h' file not found
#include <openssl/ssl.h>
1 error generated.  
make: *** [binder.o] Error 1

make failed, exit code 2  

Fixed with:

$ bundle config build.eventmachine --with-cppflags=-I$(brew --prefix openssl)/include
$ bundle install

Victor Velazquez

Coder, Musician, Startups, Passionate Dancer & Life Lover. Director of Engineering at MagmaLabs, Co-founder of Web Dev Talks, Co-founder of Voltaire, Co-founder of Paqkit, Ex-co-founder of Zaznova.

Subscribe to The zazvick's blog

Get the latest posts delivered right to your inbox.

or subscribe via RSS with Feedly!