A place for my personal musings, about programming, design or whatever come across my mind

thin on windows

Read about thin for a while (faster than webrick, faster than mongrel), but didn’t really get the chance to try it out, until recently.

As I am looking for moving my little rails application out of instantrails to a proper production environment, decided to give thin a spin, too bad Passenger isn’t supporting Windows platform, heard a lot of good thing about it too.

Installing thin server on Windows isn’t quite straightforward though. Thin actually consist of mongrel parser, EventMachine, and rack, but the latest EventMachine gem is not win32 binary release, that pose a lot of problem for the installation.

There are a few workarounds suggested on the net,
from Winston

  • install rack with the usual gem install
  • install EventMachine gem 0.8.1 as local gem
  • install thin gem install thin –ignore-dependencie

But this didn’t quite workout for me, some suggested to install MinGW and MSYS, then the normal path of gem install thin should just work. Tried that, but fail as well.

Then found out that EventMachine has a binary release at 0.12.6, and with that it works right away for me, here are the steps that did it for me,

  • gem install rack
  • gem install eventmachine-0.12.6-x86-mswin32-60.gem (download gem to local, and install locally)
  • gem install thin

Only after a full circle of searching around the net, that I found out these steps are actually mentioned in the comments by Marty McGee in winston’s original post. Duh.

2 Comments
Luis Lavena
Luis Lavena

Can I ask you what version of Ruby are you using?

Installing it with RubyInstaller and the DevKit is pretty straight forward:

C:\Users\Luis>ruby -v
ruby 1.8.7 (2010-06-23 patchlevel 299) [i386-mingw32]

C:\Users\Luis>gem install thin
Temporarily enhancing PATH to include DevKit…
Building native extensions. This could take a while…
Successfully installed rack-1.2.1
Successfully installed eventmachine-0.12.10
Successfully installed daemons-1.1.0
Successfully installed thin-1.2.7-x86-mingw32
4 gems installed

You can find installation instructions for the DevKit here:

http://wiki.github.com/oneclick/rubyinstaller/development-kit

Along with others tutorials about installation here:

http://wiki.github.com/oneclick/rubyinstaller/tutorials

HTH.

kahfei
kahfei

Hi Luis,

I am running ruby 1.8.7 as well.
But I installed MinGW and MSYS separately and not knowing about Devkit at all at that time. Guess I might have messed up the part to point MSYS correctly to MinGW.

Installing thin with Devkit work like a charm! Thanks for the really helpful advise, Luis. 🙂

Leave A Comment