123456789_123456789_123456789_123456789_123456789_

To compile EM with SSL on Windows one needs to have OpenSSL libraries and headers from http://slproweb.com/products/Win32OpenSSL.html

Make sure you download bigger package described as "Recommended for software developers by the creators of OpenSSL" - it should contain lib/MinGW and include/openssl subdirectories

Download and install it to preferred directory for example C:\OpenSSL

To compile the gem from source with SSL use following command:

rake compile -- --with-ssl-dir=c:/OpenSSL

To compile it with SSL using bundler issue following command before installing the bundle:

bundle config build.eventmachine --with-ssl-dir=c:/OpenSSL

The above works fine from 1.0.8

PS. I am not totally sure why but bundle config does not always work as expected and I am forced to manually uninstall gem and install it again with proper flag as below:

gem install eventmachine -- --with-ssl-dir=c:/OpenSSL

PS2. As per https://github.com/eventmachine/eventmachine/issues/689

gem install eventmachine --platform ruby -- --with-ssl-dir=c:/OpenSSL

to force local compilation and not to download precompiled gem without SSL