Tuesday, April 3, 2012

How to replace WEBrick with Thin for Windows development

WEBrick still seems awful slow on Windows. Last time I played with Rails, Mongrel was the goto replacement for WEBrick. Alas, Mongrel's no longer supported. So then I learned Thin is the new Mongrel. Here's how to get it working on Windows:

First, you might have to do this to install thin on Windows:
gem install eventmachine --pre
gem install thin


thanks to frogz
Then add the line gem 'thin' to your Gemfile to make Thin the default server when you run rails s, et voila:
=> Booting Thin 
=> Rails 3.2.1 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
>> Thin web server (v1.3.1 codename Triple Espresso)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:3000, CTRL+C to stop

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.