You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unable to load the EventMachine C extension, ruby 2.7.4, Mac OS 12.0.1 x86 #960
Hello, This is what I get when I run the rails s command:
Unable to load the EventMachine C extension; To use the pure-ruby reactor, require 'em/pure_ruby'
Traceback (most recent call last):
35: from bin/rails:3:in `<main>'
34: from bin/rails:3:in `load'
33: from /Users/zolo.y/GitHub/Microsites/site_generator/bin/spring:15:in `<top (required)>'
32: from /Users/zolo.y/.rbenv/versions/2.7.4/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require'
31: from /Users/zolo.y/.rbenv/versions/2.7.4/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require'
30: from /Users/zolo.y/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `<top (required)>'
29: from /Users/zolo.y/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `load'
28: from /Users/zolo.y/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/spring-2.1.1/bin/spring:49:in `<top (required)>'
27: from /Users/zolo.y/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/client.rb:30:in `run'
26: from /Users/zolo.y/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/client/command.rb:7:in `call'
25: from /Users/zolo.y/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `call'
24: from /Users/zolo.y/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `load'
23: from /Users/zolo.y/GitHub/Microsites/site_generator/bin/rails:9:in `<top (required)>'
22: from /Users/zolo.y/GitHub/Microsites/site_generator/bin/rails:9:in `require'
21: from /Users/zolo.y/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/railties-5.1.7/lib/rails/commands.rb:16:in `<top (required)>'
20: from /Users/zolo.y/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/railties-5.1.7/lib/rails/command.rb:44:in `invoke'
19: from /Users/zolo.y/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/railties-5.1.7/lib/rails/command/base.rb:63:in `perform'
18: from /Users/zolo.y/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
17: from /Users/zolo.y/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
16: from /Users/zolo.y/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
15: from /Users/zolo.y/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/railties-5.1.7/lib/rails/commands/server/server_command.rb:130:in `perform'
14: from /Users/zolo.y/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/railties-5.1.7/lib/rails/commands/server/server_command.rb:130:in `tap'
13: from /Users/zolo.y/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/railties-5.1.7/lib/rails/commands/server/server_command.rb:133:in `block in perform'
12: from /Users/zolo.y/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/railties-5.1.7/lib/rails/commands/server/server_command.rb:133:in `require'
11: from /Users/zolo.y/GitHub/Microsites/site_generator/config/application.rb:7:in `<top (required)>'
10: from /Users/zolo.y/.rbenv/versions/2.7.4/lib/ruby/2.7.0/bundler.rb:174:in `require'
9: from /Users/zolo.y/.rbenv/versions/2.7.4/lib/ruby/2.7.0/bundler/runtime.rb:58:in `require'
8: from /Users/zolo.y/.rbenv/versions/2.7.4/lib/ruby/2.7.0/bundler/runtime.rb:58:in `each'
7: from /Users/zolo.y/.rbenv/versions/2.7.4/lib/ruby/2.7.0/bundler/runtime.rb:69:in `block in require'
6: from /Users/zolo.y/.rbenv/versions/2.7.4/lib/ruby/2.7.0/bundler/runtime.rb:69:in `each'
5: from /Users/zolo.y/.rbenv/versions/2.7.4/lib/ruby/2.7.0/bundler/runtime.rb:74:in `block (2 levels) in require'
4: from /Users/zolo.y/.rbenv/versions/2.7.4/lib/ruby/2.7.0/bundler/runtime.rb:74:in `require'
3: from /Users/zolo.y/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/thin-1.8.1/lib/thin.rb:7:in `<top (required)>'
2: from /Users/zolo.y/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/thin-1.8.1/lib/thin.rb:7:in `require'
1: from /Users/zolo.y/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/eventmachine-1.2.7/lib/eventmachine.rb:8:in `<top (required)>'
/Users/zolo.y/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/eventmachine-1.2.7/lib/eventmachine.rb:8:in `require': dlopen(/Users/zolo.y/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/eventmachine-1.2.7/lib/rubyeventmachine.bundle, 0x0009): symbol not found in flat namespace '_ERR_load_crypto_strings' - /Users/zolo.y/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/eventmachine-1.2.7/lib/rubyeventmachine.bundle (LoadError)
Unable to load the EventMachine C extension; To use the pure-ruby reactor, require 'em/pure_ruby'
Traceback (most recent call last):
22: from /Users/<>/.rvm/gems/ruby-2.5.1@push/bin/ruby_executable_hooks:22:in `<main>'
21: from /Users/<>/.rvm/gems/ruby-2.5.1@push/bin/ruby_executable_hooks:22:in `eval'
20: from /Users/<>/.rvm/gems/ruby-2.5.1@push/bin/rainbows:23:in `<main>'
19: from /Users/<>/.rvm/gems/ruby-2.5.1@push/bin/rainbows:23:in `load'
18: from /Users/<>/.rvm/gems/ruby-2.5.1@push/gems/rainbows-5.2.1/bin/rainbows:127:in `<top (required)>'
17: from /Users/<>/.rvm/gems/ruby-2.5.1@push/gems/rainbows-5.2.1/bin/rainbows:127:in `new'
16: from /Users/<>/.rvm/gems/ruby-2.5.1@push/gems/rainbows-5.2.1/lib/rainbows/http_server.rb:20:in `initialize'
15: from /Users/<>/.rvm/gems/ruby-2.5.1@push/gems/unicorn-5.8.0/lib/unicorn/http_server.rb:79:in `initialize'
14: from /Users/<>/.rvm/gems/ruby-2.5.1@push/gems/unicorn-5.8.0/lib/unicorn/http_server.rb:79:in `new'
13: from /Users/<>/.rvm/gems/ruby-2.5.1@push/gems/unicorn-5.8.0/lib/unicorn/configurator.rb:78:in `initialize'
12: from /Users/<>/.rvm/gems/ruby-2.5.1@push/gems/unicorn-5.8.0/lib/unicorn/configurator.rb:85:in `reload'
11: from /Users/<>/.rvm/gems/ruby-2.5.1@push/gems/unicorn-5.8.0/lib/unicorn/configurator.rb:85:in `instance_eval'
10: from rainbows.rb:1:in `reload'
9: from /Users/<>/.rvm/gems/ruby-2.5.1@push/gems/rainbows-5.2.1/lib/rainbows/configurator.rb:48:in `Rainbows!'
8: from /Users/<>/.rvm/gems/ruby-2.5.1@push/gems/rainbows-5.2.1/lib/rainbows/configurator.rb:48:in `instance_eval'
7: from rainbows.rb:2:in `block in reload'
6: from /Users/<>/.rvm/gems/ruby-2.5.1@push/gems/rainbows-5.2.1/lib/rainbows/configurator.rb:85:in `use'
5: from /Users/<>/.rvm/gems/ruby-2.5.1@push/gems/rainbows-5.2.1/lib/rainbows/configurator.rb:85:in `const_get'
4: from /Users/<>/.rvm/gems/ruby-2.5.1@push/gems/rainbows-5.2.1/lib/rainbows/configurator.rb:85:in `require'
3: from /Users/<>/.rvm/gems/ruby-2.5.1@push/gems/rainbows-5.2.1/lib/rainbows/event_machine.rb:2:in `<top (required)>'
2: from /Users/<>/.rvm/gems/ruby-2.5.1@push/gems/rainbows-5.2.1/lib/rainbows/event_machine.rb:2:in `require'
1: from /Users/<>/.rvm/gems/ruby-2.5.1@push/gems/eventmachine-1.2.7/lib/eventmachine.rb:8:in `<top (required)>'
/Users/<>/.rvm/gems/ruby-2.5.1@push/gems/eventmachine-1.2.7/lib/eventmachine.rb:8:in `require': dlopen(/Users/<>/.rvm/gems/ruby-2.5.1@push/gems/eventmachine-1.2.7/lib/rubyeventmachine.bundle, 0x0009): symbol not found in flat namespace '_ERR_load_crypto_strings' - /Users/<>/.rvm/gems/ruby-2.5.1@push/gems/eventmachine-1.2.7/lib/rubyeventmachine.bundle (LoadError)
Unable to load the EventMachine C extension; To use the pure-ruby reactor, require 'em/pure_ruby'
------------------------------------------------
Jekyll 4.2.1 Please append `--trace` to the `serve` command
for any additional information or backtrace.
------------------------------------------------
/Users/Donny/.rvm/gems/ruby-3.1.0/gems/eventmachine-1.2.7/lib/eventmachine.rb:8:in `require': dlopen(/Users/Donny/.rvm/gems/ruby-3.1.0/gems/eventmachine-1.2.7/lib/rubyeventmachine.bundle, 0x0009): symbol not found in flat namespace '_SSL_get1_peer_certificate' - /Users/Donny/.rvm/gems/ruby-3.1.0/gems/eventmachine-1.2.7/lib/rubyeventmachine.bundle (LoadError)
from /Users/Donny/.rvm/gems/ruby-3.1.0/gems/eventmachine-1.2.7/lib/eventmachine.rb:8:in `<top (required)>'
from /Users/Donny/.rvm/gems/ruby-3.1.0/gems/em-websocket-0.5.3/lib/em-websocket.rb:3:in `require'
from /Users/Donny/.rvm/gems/ruby-3.1.0/gems/em-websocket-0.5.3/lib/em-websocket.rb:3:in `<top (required)>'
from /Users/Donny/.rvm/gems/ruby-3.1.0/gems/jekyll-4.2.1/lib/jekyll/commands/serve/live_reload_reactor.rb:3:in `require'
from /Users/Donny/.rvm/gems/ruby-3.1.0/gems/jekyll-4.2.1/lib/jekyll/commands/serve/live_reload_reactor.rb:3:in `<top (required)>'
from /Users/Donny/.rvm/gems/ruby-3.1.0/gems/jekyll-4.2.1/lib/jekyll/commands/serve.rb:143:in `require_relative'
from /Users/Donny/.rvm/gems/ruby-3.1.0/gems/jekyll-4.2.1/lib/jekyll/commands/serve.rb:143:in `register_reload_hooks'
from /Users/Donny/.rvm/gems/ruby-3.1.0/gems/jekyll-4.2.1/lib/jekyll/commands/serve.rb:98:in `process'
from /Users/Donny/.rvm/gems/ruby-3.1.0/gems/jekyll-4.2.1/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
from /Users/Donny/.rvm/gems/ruby-3.1.0/gems/jekyll-4.2.1/lib/jekyll/command.rb:91:in `each'
from /Users/Donny/.rvm/gems/ruby-3.1.0/gems/jekyll-4.2.1/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
from /Users/Donny/.rvm/gems/ruby-3.1.0/gems/jekyll-4.2.1/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
from /Users/Donny/.rvm/gems/ruby-3.1.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
from /Users/Donny/.rvm/gems/ruby-3.1.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
from /Users/Donny/.rvm/gems/ruby-3.1.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
from /Users/Donny/.rvm/gems/ruby-3.1.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
from /Users/Donny/.rvm/gems/ruby-3.1.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
from /Users/Donny/.rvm/gems/ruby-3.1.0/gems/jekyll-4.2.1/exe/jekyll:15:in `<top (required)>'
from /Users/Donny/.rvm/gems/ruby-3.1.0/bin/jekyll:25:in `load'
from /Users/Donny/.rvm/gems/ruby-3.1.0/bin/jekyll:25:in `<main>'
from /Users/Donny/.rvm/gems/ruby-3.1.0/bin/ruby_executable_hooks:22:in `eval'
from /Users/Donny/.rvm/gems/ruby-3.1.0/bin/ruby_executable_hooks:22:in `<main>'
In my case I ended up here because I built eventmachine using the openssl at $(brew --prefix openssl), which happens to be /opt/homebrew/opt/openssl@3.
I redid it using openssl@1.1 and now I'm not running into this error anymore:
Are @sodabrew@olleolleolle or any of the other recent contributors able to shed any light on the situation here? There have been a lot of commits to the main branch but no gem release since 2018.
Reacted by Christian Tietze and YAMAMOTO, Masayuki
I'm having this issue and uninstalling/installing has not worked, neither did sshock solution above. I'm on a 2021 Mac M1 machine: Unable to load the EventMachine C extension; To use the pure-ruby reactor, require 'em/pure_ruby'
dlopen(/Users/katana/MIJE/sandbox-mije-jekyll/vendor/bundle/ruby/3.1.0/bundler/gems/eventmachine-9cb13a8a6236/lib/rubyeventmachine.bundle, 0x0009): symbol not found in flat namespace '_SSL_get1_peer_certificate'
UPDATE: I was able to fix this by simply getting everything up-to-date: gem update --system
Then ensured that I have openssl@3 and ruby-3.1.1 on the Mac and, finally, eventmachine 1.2.7 in my project's Gemfile.
Then bundle update and bundle exec jekyll serve
In my case I ended up here because I built eventmachine using the openssl at $(brew --prefix openssl), which happens to be /opt/homebrew/opt/openssl@3.
I redid it using openssl@1.1 and now I'm not running into this error anymore:
Reacted by César Román, Nywton Barros, Ryan Brown, Helena Andrasic, Julian Rubisch, isobelp, yonatan miller, Stephen Elizabeth, Akio Itaya, jusung Kye and 8 more
In my case I ended up here because I built eventmachine using the openssl at $(brew --prefix openssl), which happens to be /opt/homebrew/opt/openssl@3.
I redid it using openssl@1.1 and now I'm not running into this error anymore:
This is the only fix that worked for me, tried everything else above with no luck. So, the below is fine but a new version has to be released here of the 💎 , the last one is 1.2.7 since 2018:
I'm not that familiar with either EventMachine or macOS.
But, for those who've needed to set either --with-openssl-dir or --with-pkg-config, does the output of the following contain an OpenSSL directory? If so, EM might be able to be patched to fix the need for either of the arguments.
Activity
sheuer commentedon Dec 30, 2021
I'm also running into this issue on an M1 Mac running Mac OS 12.1 trying to run a sinatra app /w rainbows.
themudassarhassan commentedon Jan 1, 2022
facing the same issue on mac m1. Any solution?
Dovizu commentedon Jan 9, 2022
Likewise
adampal commentedon Jan 14, 2022
I was able to get it working by doing:
Then adding this to my gem file:
I'm guessing there's some updates currently in the master branch that have not been released as an update to the gem.
sshock commentedon Mar 3, 2022
If there have been important fixes, why has there been no new releases in almost 4 years?
sshock commentedon Mar 4, 2022
In my case I ended up here because I built eventmachine using the openssl at
$(brew --prefix openssl), which happens to be/opt/homebrew/opt/openssl@3.I redid it using
openssl@1.1and now I'm not running into this error anymore:adampal commentedon Mar 8, 2022
@sshock good question.
Are @sodabrew @olleolleolle or any of the other recent contributors able to shed any light on the situation here? There have been a lot of commits to the main branch but no gem release since 2018.
RoskiDeluge commentedon May 13, 2022
I'm having this issue and uninstalling/installing has not worked, neither did sshock solution above. I'm on a 2021 Mac M1 machine:
Unable to load the EventMachine C extension; To use the pure-ruby reactor, require 'em/pure_ruby'dlopen(/Users/katana/MIJE/sandbox-mije-jekyll/vendor/bundle/ruby/3.1.0/bundler/gems/eventmachine-9cb13a8a6236/lib/rubyeventmachine.bundle, 0x0009): symbol not found in flat namespace '_SSL_get1_peer_certificate'Ruby: ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [arm64-darwin21]
UPDATE: I was able to fix this by simply getting everything up-to-date:
gem update --systemThen ensured that I have openssl@3 and ruby-3.1.1 on the Mac and, finally, eventmachine 1.2.7 in my project's Gemfile.
Then
bundle updateandbundle exec jekyll serveTorvaldsDB commentedon Nov 30, 2022
this does not work for me.
I fix it by
cesarcoatl commentedon Dec 20, 2022
@TorvaldsDB's suggestion worked for me.
Cheers!
nywton commentedon Dec 30, 2022
Thanks! It worked for me
Fix ruby for NFSN
shushugah commentedon Mar 20, 2023
This worked for me, thank you!
roryabraham commentedon Aug 19, 2023
For me I had to do:
bundle config build.eventmachine --with-ldflags="-Wl,-undefined,dynamic_lookup" bundle installdimitrovv commentedon Aug 25, 2023
This is the only fix that worked for me, tried everything else above with no luck. So, the below is fine but a new version has to be released here of the 💎 , the last one is 1.2.7 since 2018:
faizantroon commentedon Sep 1, 2023
Thanks, Thats work for me as well despite all other options
hoangtaiki commentedon Nov 2, 2023
I was able to get it working by doing:
MSP-Greg commentedon Nov 2, 2023
I'm not that familiar with either EventMachine or macOS.
But, for those who've needed to set either
--with-openssl-diror--with-pkg-config, does the output of the following contain an OpenSSL directory? If so, EM might be able to be patched to fix the need for either of the arguments.