If you are about to start a new Ruby / Ruby on Rails project on Windows environment, you should probably reconsider your options. I have encountered many Windows-related problems during the development of a large, Windows/Ruby project—problems I doubt would have existed in other environments. I’ll try to summarize here some of the reasons why I think Ruby doesn’t rock in Windows.

First of all, Ruby is Open Source Software (OSS), which I consider a good thing. However, the problem is that most OSS folks prefer environments that are easy to customize and automate, and in general OSS-friendly; Windows clearly isn’t such a platform. So, even though Ruby runs nice in Windows, I’m quite sure that the win32-related libraries have much more bugs compared to other libraries, largely due to lower number of developers and users compared to the other platforms. The problems you can run into could be because of a library that uses a system call that doesn’t exist in Windows, or behaviour is different. For example, the library could use fork() which Windows doesn’t have (and win32 equivalent doesn’t really work like fork() does). Then there’s the problem of inablity to remove an open file, which results in to troubles more often than you’d think at first (two words: log rotation).

Third, Ruby is a relatively new language, and as such it doesn’t have as much tool support as say, Java or C#. There are lots of fancy thingamajicks that make it easier to automate stuff like deployment and automatic testing, but they don’t run in Windows because of missing required libraries and/or functionality. For example, deep_test will never work in Windows (this is a provocative statement camouflaged into a fool’s claim to make such a tool appear pronto). And you can’t use such niceties as Capistrano because you really can’t ssh into a Windows box. So to make deployment in Windows easier you have to create custom installers which is a PITA (Pain In The Donkey) in general.

That doesn’t mean I’ll resort to C# from now on for every Win32 project if applicable, but I’ll certainly be much more apprehensive about using Ruby + Win32 combination next time.

4 Responses to “Starting a new Ruby project on Windows? Consider it twice”

  1. Tero Says:

    I don’t know if you already know this, but I just found a page containing a set of rather interesting articles, which seem to be quite close to subjects of this blog:

    http://www.objectmentor.com/resources/publishedArticles.html

  2. Edvard Says:

    Tero: Yup, I hadn’t seen the article list you mentioned, but I have read a few of Uncle Bob’s articles—some of them are invaluable and mind-opening, like http://www.objectmentor.com/resources/articles/CoffeeMaker.pdf

    Unfortunately, I have little to offer except highly opinionated rants, and my ideas often stem from a thought I had from reading an article by Uncle Bob, Steve Yegge or.. umm, Simon Peyton Jones. Ok, I’m not that good at FP yet, but I intend to improve a lot in that area.

  3. Tero Says:

    I hope you keep posting those opinionated rants, because I find reading them quite interesting.

    I’m perhaps a little too much “let’s get hands dirty first, read the manual later” kind of type that I noticed I have missed too much theory in my life.

    Reading from someone who actually put emphasis on purity (as much as practically possible) is very refreshing these days.

  4. EdvardM Says:

    Tero: I’m most obliged—thank you. :)

Leave a Reply