JRuby on Rails runs slow on Win 7

I have been working with a medium-sized JRoR app on Win 7 for quite
some time and it was slow and unresponsive since day 1. At first I
thought it’s due to poor DB interaction code in our app, but a few
days ago I created a blank JRoR app and noticed that it’s just as slow
and unresponsive. Loading the default home page takes around 2 secs
for the first and all the subsequent times. Running the app in the
–server mode and production environment does not fix the problem.

Today I profiled the app with VisualVM and looks like it spends most
of its time in org.jruby.RubyThread.select. The snapshot file is
available for download at:

Any ideas what’s causing this and how can it be fixed?

The same app using the same JRuby version (1.5.2) runs fine and very
smoothly on OS X SL.

Behrang S.

Just googled a bit more and looks like it has to do with mongrel
binding to Binding to and going to
rather than localhost:3000 fixed the problem.

Behrang S.

An alternative solution is to uncomment localhost

in your hosts file.

Behrang S.

It may be related to


Being set to false by default in 1.8