# Error when running: “symbol not found in flat namespace '\_SSL\_CTX\_set\_options'”

**URL:** <https://talk.jekyllrb.com/t/error-when-running-symbol-not-found-in-flat-namespace-ssl-ctx-set-options/6663>\
**Category:** Help\
**Created:** [November 10, 2021, 11:17am UTC](https://talk.jekyllrb.com/t/error-when-running-symbol-not-found-in-flat-namespace-ssl-ctx-set-options/6663 "2021-11-10T11:17:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![xplosionmind](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/xplosionmind/32/4041_2.png) [@xplosionmind](https://talk.jekyllrb.com/u/xplosionmind)\
**Post date:** [November 10, 2021, 11:17am UTC](https://talk.jekyllrb.com/t/error-when-running-symbol-not-found-in-flat-namespace-ssl-ctx-set-options/6663/1 "2021-11-10T11:17:45Z")

</div>

This started happening out of the blue. Jekyll 4.2.1 and Ruby 3.0.2.

Log:

```auto
Unable to load the EventMachine C extension; To use the pure-ruby reactor, require 'em/pure_ruby'
bundler: failed to load command: jekyll (/Users/tommi/.rbenv/versions/3.0.2/bin/jekyll)
/Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/eventmachine-1.2.7/lib/eventmachine.rb:8:in `require': dlopen(/Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/eventmachine-1.2.7/lib/rubyeventmachine.bundle, 0x0009): symbol not found in flat namespace '_SSL_CTX_set_options' - /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/eventmachine-1.2.7/lib/rubyeventmachine.bundle (LoadError)
	from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/eventmachine-1.2.7/lib/eventmachine.rb:8:in `<top (required)>'
	from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/em-websocket-0.5.2/lib/em-websocket.rb:3:in `require'
	from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/em-websocket-0.5.2/lib/em-websocket.rb:3:in `<top (required)>'
	from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/jekyll-4.2.1/lib/jekyll/commands/serve/live_reload_reactor.rb:3:in `require'
	from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/jekyll-4.2.1/lib/jekyll/commands/serve/live_reload_reactor.rb:3:in `<top (required)>'
	from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/jekyll-4.2.1/lib/jekyll/commands/serve.rb:143:in `require_relative'
	from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/jekyll-4.2.1/lib/jekyll/commands/serve.rb:143:in `register_reload_hooks'
	from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/jekyll-4.2.1/lib/jekyll/commands/serve.rb:98:in `process'
	from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/jekyll-4.2.1/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
	from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/jekyll-4.2.1/lib/jekyll/command.rb:91:in `each'
	from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/jekyll-4.2.1/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
	from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/jekyll-4.2.1/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
	from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
	from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
	from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
	from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
	from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
	from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/jekyll-4.2.1/exe/jekyll:15:in `<top (required)>'
	from /Users/tommi/.rbenv/versions/3.0.2/bin/jekyll:23:in `load'
	from /Users/tommi/.rbenv/versions/3.0.2/bin/jekyll:23:in `<top (required)>'
	from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bundler-2.2.31/lib/bundler/cli/exec.rb:58:in `load'
	from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bundler-2.2.31/lib/bundler/cli/exec.rb:58:in `kernel_load'
	from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bundler-2.2.31/lib/bundler/cli/exec.rb:23:in `run'
	from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bundler-2.2.31/lib/bundler/cli.rb:478:in `exec'
	from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bundler-2.2.31/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bundler-2.2.31/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
	from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bundler-2.2.31/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
	from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bundler-2.2.31/lib/bundler/cli.rb:31:in `dispatch'
	from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bundler-2.2.31/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
	from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bundler-2.2.31/lib/bundler/cli.rb:25:in `start'
	from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bundler-2.2.31/exe/bundle:49:in `block in <top (required)>'
	from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bundler-2.2.31/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
	from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bundler-2.2.31/exe/bundle:37:in `<top (required)>'
	from /Users/tommi/.rbenv/versions/3.0.2/bin/bundle:23:in `load'
	from /Users/tommi/.rbenv/versions/3.0.2/bin/bundle:23:in `<main>'

```

---

<div class="post-metadata">

**Author:** ![BillRaymond](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/billraymond/32/5963_2.png) [@BillRaymond](https://talk.jekyllrb.com/u/BillRaymond)\
**Post date:** [November 11, 2021, 12:17am UTC](https://talk.jekyllrb.com/t/error-when-running-symbol-not-found-in-flat-namespace-ssl-ctx-set-options/6663/2 "2021-11-11T00:17:22Z")

</div>

Usually, we have some decent Ruby people respond to this, but since I have not seen any responses yet, I’m going to try to help. Caveat: As you may have guessed, I am not a Ruby expert 🙂

I think the error has less to do with the `_ssl` issue, and more with the previous error that says `unable to load the EventMachine C extension`.

Check out this article to see if it is the immediate fix you need:

> **[Jekyll - Unable to load the EventMachine C extension](https://robbinespu.gitlab.io/posts/jekyll-unable-load-eventmachine/)**
>
> When I using --livereload parameter with Jekyll, I get nasty failure like below :
> bundle exec jekyll serve --livereload --verbose -I . . . Writing Metadata: .jekyll-metadata done in 3.442 seconds. Requiring: jekyll-watch Watcher: Ignoring...

Also, please _carefully_ review the guidance in the installation documentation I share below. Very often there is a path or environment variable that was not set on the development machine that causes odd errors like this.

> **[Installation](https://jekyllrb.com/docs/installation/)**
>
> Official guide to install Jekyll on macOS, GNU/Linux or Windows.

If you are still encountering issues, please share what you are typing to get the error. For example, are you typing `bundle exec jekyll serve`?

---

<div class="post-metadata">

**Author:** ![xplosionmind](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/xplosionmind/32/4041_2.png) [@xplosionmind](https://talk.jekyllrb.com/u/xplosionmind)\
**Post date:** [November 13, 2021, 10:15am UTC](https://talk.jekyllrb.com/t/error-when-running-symbol-not-found-in-flat-namespace-ssl-ctx-set-options/6663/3 "2021-11-13T10:15:29Z")

</div>

Even after reinstalling Jekyll, Ruby and `eventmachine` (as the article you linked suggested) from scratch, I keep getting the same error. The same happens by running `bundle exec jekyll serve`.

I am desperate and puzzled… any further ideas?

---

<div class="post-metadata">

**Author:** ![MSP-Greg](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/msp-greg/32/4091_2.png) [@MSP-Greg](https://talk.jekyllrb.com/u/MSP-Greg)\
**Post date:** [November 15, 2021, 3:18am UTC](https://talk.jekyllrb.com/t/error-when-running-symbol-not-found-in-flat-namespace-ssl-ctx-set-options/6663/4 "2021-11-15T03:18:29Z")

</div>

Re EventMachine, try

gem ‘eventmachine’, ‘1.3.0.dev.1’, git: ‘git@github.com:eventmachine/eventmachine’, branch: ‘master’

I haven’t tried it, but EventMachine 1.2.7 is not compatible with Ruby 3.0…
