It takes almost ten seconds to start a Rails test on my Windows XP box. The test may report that it took it a fraction of a second to run, but it actually takes about ten seconds for it to start. The Rails Console and Mongrel have the same problem, but I can deal with that. However, with unit tests, it’s not acceptable because rapid feedback from tests is the key to rapid development.

I’ve had JUnit tests using Spring and Hibernate that start faster than this. And in Java, incremental compilers (for example, the one that comes with Eclipse) tell me immediately when I’ve stuffed up syntax. With interpreted Ruby on Rails, I have to wait ten seconds just to be told that I’ve made a typo.

To experience the problem, all I have to do is create a new Rails project, create a single model, and then run the test for that model. It takes ten seconds to start the test, give or take a second or so. Trying JRuby is not an option at this stage because at the end of the day I need to use ferret on my project, which requires native C extensions.

I started playing around with Ubuntu on VMWare on Windows and discovered that Rails starts faster under this setup than on Windows directly. I don’t really know why, but my best guess is that the Windows filesystem isn’t very good for serving up all of the text files that Ruby processes when it bootstraps the Rails environment. I’m guessing that VMWare, on the other hand, pretty much takes one big Windows file and lets Ubuntu treats it as a single Unix filesystem.

Those people who have raised concerns about this on the web are met with deafening silence or are told to get a Mac. I ended up getting a Mac and everything runs fine on that. However, I still need to test with IE 6 and 7 so have to have a couple of instances of Windows XP running anyway.

I want to be wrong. I’ll issue a public retraction if I am. But until proven otherwise, my message for you is this: if you want to do Rails development and you’re running Windows, be prepared to buy a Mac or set up a Linux environment.

For those who care, I’m using Ruby 1.8.6 and Rails 1.2.3. I’ve got a 1.7GHz Pentium M with 1GB RAM and 10GB of free drive space. I’ve got colleagues with 2GB of RAM that have the same problem. If I look at the task manager whilst starting a test, it seems to be mainly CPU cycles that Ruby is taking, not RAM.

Stop Press: I’ve done the same thing with JRuby and have had the same problem.


  1. hi i have recently started playing around with RoR.

    I am using radRails plugin in my eclipse ide, running on Windows. The built-in webrick certainly takes less than 10 seconds to start up. Maybe give that a go… HTH

  2. It’s strange because i’m having issues with ubuntu 9.04. i develop the app on my windows machine but it seems to bug out when i bring the code home. windows development isnt ideal either tho.

  3. Why are you using Windows for development? Seriously, that is about the worst thing you could do, except use PHP.

    People who use windows deserve the headaches they get.

    Stop crying and get a real OS.

    Don’t even think about deploying your app on Windows.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s