首页 > 解决方案 > 在 m1 上使用 ssl 安装 gem eventmachine 1.2.7

问题描述

我发布这个以防其他人有同样的问题。我试图从和苹果 m1 笔记本电脑部署我的 ruby​​ 项目,并且得到libc++abi: terminating with uncaught exception of type std::runtime_error: Encryption not available on this event-machine.

检查事件机器给

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

尝试在 eventmachine 上卸载并安装无济于事。

标签: apple-m1eventmachine

解决方案


搜索openssl的安装位置,然后卸载并重新安装

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

然后有了

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

推荐阅读