Eric Guo's

in HTML5, JavaScript, Ruby & Rails, Python, and Cloud MES!

Compile Eventmachine 1.0.3 in Ruby 2.1.3 on Windows


eventmachine didn’t release a new gems for a long time, so we have to manually compile if you decide using Ruby 2.1.3, it’s probably the most complex gems which can still successfully install on windows as far as I known, here is the steps for your interesting:

git clone
cd eventmachine && bundle install

Now you will meet the bluecloth can not install problem first, which you can following stackoverflow steps including patch ext/bluecloth.h and 6 steps.

Now you need using updated version of rake-compiler (v0.9.3) to continue, so change eventmachine.gemspec to that version and do the bundle install again.

Now we can running rake package and it should generate the updated 1.0.3 gem file you need, but before that you need another depend lzma package mentioned in Ruby Installer Google Group, I only tested x86 but the x64 should be same.

  1. Put the download openssl-1.0.0m-x86-windows.tar.lzma to c:\temp
  2. run C:\DevKit\devkitvars.bat
  3. c:\Temp> bsdtar --lzma -xf openssl-1.0.0m-x86-windows.tar.lzma
  4. c:\git\eventmachine\pkg> gem install ./eventmachine-1.0.3.gem --platform=ruby -- --with-opt-dir=C:/Temp

Now enjoy eventmachine on ruby 2.1.3 windows!