Notice: I understand this is nearing religious boundaries, these are just my feelings from my experience..
I’ve been playing around with Ruby on Rails (RoR) for sometime now on the side, looking to get to know it so any ‘new’ projects at work can utilize it’s goodness. The reason for this could be a whole other post, but for time sake we’ll just say that for the last couple years on a PHP/Zend project I’ve found myself striving to implement things that RoR rails provides out of the box. The following is just my experience in learning RoR.
In my playing I started out on my Windows 7 based desktop and the Windows 7 install on my dual-boot laptop as this was what I was in most of the time for work. My dev environment was pretty simple:
- Emacs 23.?
- Multiple modes, flymake, ecb, other emacs goodness
- git bash (as a terminal)
- Ruby 1.9.2 w/Devkit (rubyinstsaller.org)
- Rails 3 w/ various gems
I will say that it was easy to setup on Windows, no problems there. Some issues that I accounted to Windows were actually issues with most tutorials still being Rails2 at the time and the inclusion of bundler and the need for bundle exec in Rails3.
The reason I would NOT recommend Windows for Rails development is SPEED. If I’d gotten into more depth as far as gems and such it sounds like there might have been compatibility issues as well but I stopped well short of that due to speed. Running 10 unit tests (rspec) would take as much as 30 seconds OR MORE on Windows. Those same tests on other platforms would take less 5 seconds or less depending on circumstances. Starting console or server was just as painfully slow. I’m running an i7 quad core with 6gb of RAM, so it’s not like it was the machine lacking; it’s the most powerful of all 3 machines.
The other negative was no RVM on Windows. I don’t jump ruby versions much but having separate gemsets has turned out to be awesome. I’ve since heard of a windows copy called pik, but I can’t vouch for it.
I also have a mac mini at my desk for previous projects I’ve done for iPhone apps. Setting up my ‘standard’ environment in OSX was actually somewhat of a problem. Turns out that a number of the tools I use are baked into OSX and either upgrading them or replacing them is near impossible. Luckily, as it seems OSX is the platform of choice for RoR development, most of these problems have been overcome. One such tool is RVM. It’s an awesome tool in itself but it’s almost required on OSX if you want to use anything beyond the OSX baked in ruby 1.8.7 from 2009.
Once up and running OSX performed VERY nicely, especially after coming off of the very slow Windows. Having a better command line and more/better tools there is a definite plus as well.
Another negative that I’ve since found deals with the MacBook Pro and it’s keyboard layout. I setup my dev environment on my wife’s MBP and I find it very trying. If you’re an emacs user Ctrl & Alt are more important than the home row to you and your coding. Well, on the MBP, they put the FN key out there where every other keyboard I’ve used puts the Ctrl key and it is MESSING with me. I’ve tried getting used to it but can’t. Fortunately I think you can remap the keyboard, if I could only talk my wife into it…
My laptop has 2 hdd’s and currently it’s setup to dual boot between Windows 7 on one drive and Ubuntu Linux on the other drive. I think this is going to change to be a full Ubuntu install with a VM of windows on the second drive very soon. Setup was much the same as on windows: Emacs, Rails 3, Rails 1.9, etc. The only addition was RVM as with the OSX.
I’d definitely recommend Ubuntu (or linux) for a development environment for Ruby. Easy to install and setup. Very speedy (compared to windows) for running tests, console, and server. Linux in general can have some problems from time to time. Being all open, sometimes things just don’t work as nicely together as you’d want. But it tends to give you may more flexibility.
- Ubuntu (Linux)
Windows would be the one ‘do not recommend’. It’s doable but painful! The other two have there problems but Ubuntu wins for two reasons: I like Linux, and it’s almost certainly what your app is going to be running on in production anyways! Also, OSX has a rather high barrier to entry (cost), while Ubuntu has become almost stupidly simple to install and the inclusion of an ‘App Store’ makes getting all the big stuff together a breeze. Plus you can try it out inside a VM (like VirtualBox) in like an hour or two for free.
Granted, my post is based off a number of assumptions like using Emacs for an IDE. If I was a TextMate user I’d almost be forced to use OSX. I’d guess there are F/OSS editors that have tried to mimic TextMate you could get on Linux but TextMate itself is OSX.
From Left to Right: Mac Mini (2 screens), Windows 7 desktop, Dual-Boot laptop
But you don’t have to take my word for it!