Rails Development Sucks on Windows

Rails Development Sucks on Windows

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.


I'm a Senior Consultant at Shine Solutions.

  • Pingback:CSS Layout Sucks for Panel-Based Web Apps | Shine Blog
    Posted at 09:24h, 01 December Reply

    […] to the second in my ‘This Sucks’ series (for the first in the series, see Rails Development on Windows Sucks). Before you get to alarmed about me being a negative nancy, hopefully this will be the last in the […]

  • pali
    Posted at 13:39h, 16 January Reply

    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

  • roger faith
    Posted at 07:59h, 09 October Reply

    Check out mingw – it’s far faster for windows
    Or I suppose if desperate you could try colinux or something like that [or virtualbox or vmware running linux, like you did]

  • Joseph Le Brech
    Posted at 05:54h, 30 July Reply

    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.

  • fdjksl
    Posted at 01:53h, 13 February Reply

    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.

  • Pingback:Rails and Windows – the love affair continues… | The Shine Technologies Blog
    Posted at 06:11h, 24 August Reply

    […] while ago Ben wrote about how Ruby on Rails development sucks on Windows. It seems that the move by the Rails Core team from subversion to Git has inflamed this issue […]

  • Pingback:CSS Layout Sucks for Panel-Based Web Apps | The Shine Technologies Blog
    Posted at 00:57h, 06 September Reply

    […] to the second in my ‘This Sucks’ series (for the first in the series, see Rails Development on Windows Sucks). Before you get to alarmed about me being a negative nancy, hopefully this will be the last in the […]

Leave a Reply

%d bloggers like this: