0
votes

I am new to Ruby on Rails and I'm trying to create a website using the same. I have added a few gems to my gem file and trying to bundle them, but encounter this error.

An error occurred while installing eventmachine (1.2.7), and Bundler cannot continue. Make sure that gem install eventmachine -v '1.2.7' --source 'https://rubygems.org/' succeeds before bundling.

I have tried doing gem install eventmachine -v '1.2.7' but get this error:

ERROR: Failed to build gem native extension.
 
 current directory: /.rvm/gems/ruby-3.0.0/gems/eventmachine-1.2.7/ext
 make "DESTDIR=" clean
 current directory: /.rvm/gems/ruby-3.0.0/gems/eventmachine-1.2.7/ext
 make "DESTDIR=" compiling binder.cpp In file included from

binder.cpp:20: ./project.h:119:10: fatal error: 'openssl/ssl.h' file not found
 #include <openssl/ssl.h>
     ^~~~~~~~~~~~~~~ 1 error generated. make: *** [binder.o] Error 1

Can someone please help?

1
It would be helpful for you to state more context. Which O.S., which version of rails? Myself, when encoutering bundle install issues, I follow the steps outlined in: stackoverflow.com/questions/12336160/…Sjors Branderhorst

1 Answers

0
votes
 #include <openssl/ssl.h>

You seem to be missing the c++ development source necessary for ruby to install openssl.

Install libssl-dev and try the gem installation again. You may be missing other development libraries as well.