Install gem eventmachine 1.2.7 with ssl on m1
Asked Answered
F

3

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.

Fiore answered 10/8, 2021 at 17:9 Comment(0)
M
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 [email protected])/lib/pkgconfig" \ 
   gem install eventmachine -v '1.0.9.1'
Mesozoic answered 11/4, 2022 at 12:7 Comment(0)
F
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
Fiore answered 10/8, 2021 at 17:9 Comment(1)
Thank you - this did the trick for me on my M1!Argue
L
1

This worked for me:

gem install eventmachine -v '1.2.7' -- --with-ldflags="-Wl,-undefined,dynamic_lookup"
Lawless answered 25/7, 2023 at 13:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.