litany against fear
Surviving as a Windows Based Rails Developer Notes
Part of my series of notes from the Professional Ruby Conference. See them all here.
This talk is by David Berube.
Rails on Windows happens because sometimes it’s a MS shop that isn’t fully converted to Ruby. Fundamentally, Windows is not a good operating system. It just isn’t POSIX. Most Rails devs are using OSX and are deploying on some version of Linux. Windows definitely isn’t suitable for a server environment.
Easy way to get started is the One Click Ruby Installer (http://rubyinstaller.rubyforge.org) Many intrinsic pitfalls.
- Automatic binary conversion: LF => CRLF. Sucks since you need a special flag to tell Windows not to touch it.
- No Kernel#fork. Can’t do anything about it.
- No GNU (commands).
- No Compiler.
Running the actual development environment takes a lot of work. Visual Studio does have Ruby in Steel (but that costs money). NetBeans is clunky. He recommends using gvim, despite the obvious learning curve, since it can easily translate on UNIX systems. Emacs? E-text editor too has bundles, but don’t work all the time.
POSIXing your Windows box will never happen 100%. Cygwin is a good way to emulate the environment, but it sort of sucks. There are a few ways to emulate linux utilities too: unxutils, gnuwin32. Plenty of other tools too: PuTTY, Filezilla/SmartFTP, Litestep for Virtual Desktops and more.
Why switch? Go for Ubuntu! (If you can) It’s awesome. There are some bright sides…FXRuby and shoes for GUI stuff, and OLE isn’t too bad within Ruby either.