5

I'm posting this in case anyone else has the same issue. I was trying to deploy my ruby project from and apple m1 laptop and was getting libc++abi: terminating with uncaught exception of type std::runtime_error: Encryption not available on this event-machine .

Checking eventmachine gave

ruby -reventmachine -ve "puts EM.library_type, EM.ssl?"                     
ruby 2.6.7p197 (2021-04-05 revision 67941) [arm64-darwin20]
extension
false

Tried an uninstall and install on eventmachine to no avail.

Chrissy H
  • 461
  • 4
  • 12

3 Answers3

5

@Chrissy H answer did not work on my M1 Mac, but the following did (by recompiling native extensions)

PKG_CONFIG_PATH="$(brew --prefix openssl)/lib/pkgconfig" \
   gem install eventmachine 

Note that I' musing openssl v1 and needed a specific version, maybe that is why, anyway my full command was:

PKG_CONFIG_PATH="$(brew --prefix openssl@1.0)/lib/pkgconfig" \ 
   gem install eventmachine -v '1.0.9.1'
Pandaiolo
  • 11,165
  • 5
  • 38
  • 70
2

Searched for where openssl was installed and then uninstalled and reinstalled with

gem install eventmachine -v '1.2.7' -- --with-cppflags=-I/Users/chris/.rbenv/versions/2.6.7/openssl/include

Then had

ruby -reventmachine -ve "puts EM.library_type, EM.ssl?"                                                    
ruby 2.6.7p197 (2021-04-05 revision 67941) [arm64-darwin20]
extension
true
Chrissy H
  • 461
  • 4
  • 12
0

This worked for me:

gem install eventmachine -v '1.2.7' -- --with-ldflags="-Wl,-undefined,dynamic_lookup"
Patrick Y
  • 803
  • 8
  • 10