Friday, June 10, 2016

Rails on Windows



We all know how difficult it is to run Rails on a Windows environment.

If you visit StackOverflow you'll find thousands of questions related to this fact. It's not an easy task and most of the times it requires non-orthodox solutions.

Recently, after almost five years doing RoR, I needed to run Rails locally on a Windows environment for the first time, because a customer had a requirement for this. His system must be run in his intranet and should be hosted in his Windows server. I had never faced such need before, for all my  systems were internet-based and most of them deployed in VPS servers I configured myself, so I had no problem in doing everything needed.

When this happened, people told me to use InstantRails (in http://installrails.com/) and I did it. It really helped me a lot and I started running my app in a few minutes with this installer. But...

As you may see by this print of InstallRails website,



we are far from having the newest Ruby and Rails versions. And as soon as I started running my system there I started suffering. My system used Ruby and Rails features not available in the versions provided by InstantRails!

After fighting a lot with this, and in fear of having to review all my code to downgrade it to Ruby 2.1.5 and Rails 4.1, I installed a Linux VirtualBox in my customer's server and did the Rails thing as I was used to do. I had it running perfectly in about twenty minutes.

This called my attention out to the following facts:

1) Rails for Windows is a dumb shit! And if it was like this to me (programming since 1984, used to Windows since its first version, doing Rails almost exclusively during the last five years...) I started wondering what a computer newbie would do in my place. He/she would probably give up RoR and move back to PHP, because then he/she would have easy install/configuration with XAMPP, for instance, in minutes!

2) Rails for Windows shouldn't be a dumb shit! After all, we have millions of Windows users around the globe, including many developers. And some of them won't use Linux for nothing, 'cause some of them don't want and some of them just can't install Linux in their work computers.

Even if don't like Windows, we need to improve our efforts to keep RoR running well on it. There are millions of developers like us facing all sorts of trouble with this. And we also have to consider those corporate environments where one can't simply install what he/she likes.

The lack of this is making it hard for the RoR culture to spread in large corporations still tied to Microsoft Windows.