Limitations in running Ruby/Rails on windows Limitations in running Ruby/Rails on windows windows windows

Limitations in running Ruby/Rails on windows


Here's an overview of the current issues with Rails on Windows:

  • Ruby and Rails are slower on Windows than they are on Unix-like OS's.
  • A few gems and libraries don't work on Windows.
  • Some Unix-isms aren't available on Windows (examples).
  • The community is mostly on either Mac or Linux (This is a particularly hard one to deal with; nobody wants to be alone on one island when the rest of the tribe are partying, having fun and getting along great over on the other island. Community is important. It seems that most Windows developers that start with Rails quickly switch to a Mac or Linux. However, the small community of Windows Ruby users that do persist are extremely friendly, dedicated and knowledgeable - go say hi.)

Note much of the advice that follows is now outdated due to the magnificent efforts of the RubyInstaller team in bringing stability, compatibility and performance to Ruby on Windows. I no longer have to use VirtualBox, which says a lot about how far Ruby on Windows has come.

If you want more technical detail, the following are required reading. :

Choice quote from that last one is:

AkitaOnRails: The most obvious thing is that any Gem with C Extensions without proper binaries for Windows will fail. Trying to execute shell commands will fail and RubyInline as well. What else?

Luis Lavena: Hehe, that's just the tip of the iceberg

Having said all that, I don't find developing with Rails on Windows too painful. Using Ruby is, for the most part, a pleasure. I'd avoid InstantRails because, to be frank, it's just as easy to install Ruby properly using the one-click installer, then doing a gem install rails. If you need Apache and MySQL, WAMP is a good bet, although even these aren't required if you just stick with Mongrel and SQLite.

What I've taken to doing recently is running VirtualBox with an instance of Ubuntu Server that closely mirrors the deployment server. I map a network drive to the Ubuntu Server, then I edit and run my code directly on the VM. It uses hardly any memory (it's currently using ~43MB; contrast that with Firefox, which is using ~230MB) and Rails actually performs better than running it natively on Windows. Plus you can experiment with your virtual server in relative safety. It's a really nice setup, I highly recommend it.

Finally, here are a couple of Ruby/Rails blogs aimed at Windows users:


I found getting a development environment up and running with Instant Rails on Windows was really simple. Especially when using Netbeans or Radrails as the IDE.

Less than a 10 minute job.

What did those who struggled find to be the problem?


I've been developing Rails on a Windows PC for a couple of years and had no real problems installing back when I first started. However I recently re-built my machine and struggled to get the One-Click Ruby installer working and the latest version of Gems. So this is what I tried.

Option 1: Run a Linux Virtual Machine

I was really impressed with Charles Roper's idea of running Rails within a Linux virtual machine, and this is the route I intially went for. It all went pretty smoothly and I've been documenting it at budanters.blogspot.com. However I've been struggling with accessing the MySQL server (in Linux Virtual Machine) from the Windows host.

Option 2: Use jRuby

I recently installed the Windows version of NetBeans 6.5 Ruby bundle, and without being aware of it, this installs JRuby and the Rails gems. The IDE has a UI to install Gems, and I've now got my old application back up and running in my development enviromnent.

Update November 2009

I now use Netbeans 6.7 on Windows and in the whole I am very happy with it. The only downsides are that it installs JRuby 1.2, and I needed to install JRuby 1.3 manually to get something working (I can't remember what) and I have been completely unable to get deployment working with either Capistrano or Vlad the Deployer to work. Vlad uses Open4 which doesn't work with JRuby.

Update May 2010

Netbeans 6.8 comes with JRuby 1.4 so no longer have to fiddle around with manually installing JRuby 1.3. Also it seems that in JRuby 1.5 Open4 will now work, which means Vlad might start working.