Sunday, September 29, 2013

Rails and Windows

In a word ... "Don't".

I often see posts, especially on LinkedIn, with titles like "How do I learn Rails" etc. My advice is always to start with Michael Hartl's Rails Tutorial. A related question that often comes up though is about using Windows to do this. There are often comments that you can use Windows for this, cross-platform is good, etc. The truth though is that you're not going to have a lot of success developing Rails on Windows and if you're looking to move into Rails development as a profession, it will not probably help. There are a few different reasons for this, but first let's take a look a why you should develop for Windows.

If you've decided that Windows is a great platform and that you're ready to do your part to bring it to the Rails community, then by all means, go for it. Very few in the Rails community do use Windows, but if someone was willing to do the work to make everything that's commonly used work together under Windows, then I think it would be welcomed with open arms.

If you're just trying to learn some Rails though, this is probably not a good approach. While you're developing, you're going to have issues come up and those that can help you are going to be few and far between. In fact, even if it's not a problem with Windows per se, the fact that it works on Mac/Linux (or even appears to work there), is going to make it hard to get others interested in the problem. You're almost certainly going to have to come up with a failing test case (you should anyway) and show that this is the case. The problems you are, in general, going to be different than you'd see on a either a Mac or Linux and so most Rails developers won't have seen them and won't be able to help you solve them. Also, a big part of Rails development is done with the command line and while you can get bash or some other Unixy shell running, it's going to be sub-optimal.

For someone who is looking to move into Rails development, this is probably even more true. You're going to have all the issues listed above and those problems and their solutions won't be relevant to the issues your co-workers are going to be having. Additionally, whatever tools (here I'm thinking of editors and editor plugins especially) get adopted internally are unlikely to work well or even at all on Windows. A big part of the Rails development experience is collaboration and you won't really be able to benefit from or contribute to this collaborative process.

So, I recommend either breaking down and buying a Mac (a pretty expensive idea if you're just looking to experiment) or dual booting using Ubuntu (a pretty common platform where you'll be able to get some help easily if you run into issues).

Good luck and I'd be glad to hear your thoughts in the comments and in this case I wouldn't mind all that much being proven wrong.