I'm testing out an Amazon EC2 instance (Amazon Linux AMI 2011.09, EBS boot, 32-bit architecture with Amazon EC2 AMI Tools.) to see if it'll serve my purposes.

I've written a small backend in Ruby (which runs great on my Mac), using eventmachine and em-http-request.

When I try to run this on the EC2 instance, I get the following error:

what(): Encryption not available on this event-machine

I'm pretty sure this has something to do with the em-http-request, because I get a log output which is just before a https request.

I've read online it something to do with event-machine linking to openssl properly and I'm wondering how I should do that?

At the moment, I'm installing the dev tools with:

sudo yum groupinstall "Development Tools"


sudo yum install ruby-devel

I'm then installing rubygems with this:

wget http://...rubygems.1.8.15.tgz

tar -xvf rubygems.1.8.15

cd rubygems.1.8.15

ruby setup.rb

Installing the gems:

sudo gem install eventmachine

sudo gem install em-http-request

This all seems to work just fine, no errors so far. The error comes when I attempt to run the ruby file.

Any ideas?

  • Have you installed libssl-dev, and was eventmachine compiled without -DWITHOUT_SSL ?
    – harrymc
    Jan 18, 2012 at 10:48
  • When I attempt to download libssl-dev(el) with yum install, I just get a message that there's no such package. I don't know how eventmachine was compiled, I'm getting it directly from the gems install command. Can I check somehow?
    – Tom Irving
    Jan 19, 2012 at 11:01
  • I do not use this software, but I found this eventmachine 0.12.8 release note which says "EM.ssl? will check if the reactor was built with ssl support". This thread suggests if EM.ssl? puts "yes" else puts "no" end. If you get "no" then you need to compile your own eventmachine.
    – harrymc
    Jan 19, 2012 at 11:29
  • Yup, it outputs no. So how do I compile eventmachine with SSL support? As I mentioned before, I can't find libssl-dev(el) to install, I just get an error: "No package libssl-devel available"
    – Tom Irving
    Jan 19, 2012 at 13:55

2 Answers 2


I do not use this software, but I found this eventmachine 0.12.8 release note which says:

EM.ssl? will check if the reactor was built with ssl support

This thread suggests the following code :

  puts "yes"
  puts "no"

If you get "no" then you need to compile your own eventmachine, or use another release.


Turns out the pre-release EventMachine supports SSL with no additional steps.

It can be installed with:

gem install eventmachine --pre

Make sure you remove the old EventMachine as well, otherwise it's used instead.

  • I converted my comments into an answer. You won't be able to use a pre-release forever, so better work on convincing the developers to compile without -DWITHOUT_SSL.
    – harrymc
    Jan 19, 2012 at 18:31
  • I've marked yours as the accepted answer and yeah, hopefully I can convince them. Is there any disadvantage to compiling with SSL that I might be overlooking?
    – Tom Irving
    Jan 19, 2012 at 23:36
  • The only possible disadvantage is that the latest version configured with SSL was not tested by the developers. According to the thread I found, it worked fine for at least one person. In any case, you will find out soon enough whether it works or not, and could include that fact in your post on their forums. Just remember that version 0.x means that EventMachine is still in alpha or beta-testing.
    – harrymc
    Jan 20, 2012 at 7:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .