My .NET to Rails Survival Guide! 4
Let’s turn back time (not too far) to the summer of ‘05, when I first discovered Rails. A MCSD for .NET, I’d been working professionally with Microsoft development technologies for about 11 years. With laptop under my arm, I was ready to take on pretty much any software development challenge, whether it be web site, Windows app, heck, even stuff for Tablet PC and Windows Mobile. I was pretty confident in my ability to do pretty much anything .NET-related, and get it done quickly. Bring it on, clients!
Then I discovered Rails, and jumped in head-first. Suddenly, I no longer had the snuggly comfort of Visual Studio, Intellisense, and all the tools I knew how to use so well. I was enamored with Ruby and Rails, but what about all this other stuff? Linux? Apache? Subversion? MySQL? Huh?
So, I thought it might be fun to write about this “other stuffâ€. There are plenty of great tutorials out there about how to get going with the Ruby language and with Rails, so I’ll leave that to the experts.
I guess I’d better start off by describing my .NET toolset. I think it’s a pretty typical .NET developer’s stack of Visual Studio, NUnit, Sourcesafe, Enterprise Manager/Query Analyzer, and of course, Windows and IIS.
- IDE
The first step to breaking out of my .NET comfort zone was convincing myself that a full-featured IDE like Visual Studio was really not necessary. Wha? At the time, it seemed strange to me too, but nowadays, I’d say I even subscribe to the notion that Visual Studio rots the mind. But that’s a discussion for another day. We’ve got to develop our next great Rails app in something other than Notepad (...or do we?)
There are several decent text/code editors available. I’m currently using Ultraedit ($40). It’s blazing fast, supports Ruby syntax highlighting, and has some pretty decent macro/template features. To me, it just feels good. I had previously just used Scite (free, comes with the Ruby distribution) to develop Coastr (my first public Rails app).
A lot of people have also given the thumbs-up to Radrails (free), which used to be my tool of choice. I stopped using it, though, because it caused ugly memory problems on my laptop and often brought my machine to its knees. I do hope that it continues to improve and evolve, though, because it really is a nice application. I may give it another try soon.
There are quite a few other options as well. The funniest one being, “buy a mac” ($2500).
- Testing
Rails has testing baked right in, including unit, functional, and (now) integration testing. It’s excellent. Although, I have to admit that, at times, I would like a GUI of some kind, to give me that nice warm fuzzy green light action that NUnit provides.
- Source Control
Let’s face it. Sourcesafe sucks. Really, I would rather use a complex system of swapping 3.5” floppies instead of Sourcesafe. So I was happy to take a few days to learn the basics of Subversion. Subversion is an open-source version control system that uses the Edit-Merge-Commit model, as opposed the Check-In/Check-Out approach that I was used to. I would highly, highly recommend the book Pragmatic Version Control With Subversion ($18) by Mike Mason to get yourself started.
- Database
You can develop Rails apps on top of pretty much any of the popular relational databases. So I could have stuck with SQL Server, but MySQL seemed like the standard, open-source choice.
Another big transition for me here. As a .NET developer, I spend a whole lot of time writing stored procedures in Query Analyzer. And sifting through tables in Enterprise Manager. In Rails, you don’t even need a graphical database management tool, really. If you are disciplined about your test coverage and maintaining your fixture data, you can survive on ActiveRecord migrations alone. But, I admit, I’m lazy and I can’t. So I use EMS’ SQL Manager for MySQL (free lite version, $175 full). It’s very nice and feels very comfortable to a .NET guy like me. Comes PostgreSQL-flavored as well.
- Platform
I wasn’t a total Linux noob, but pretty darn close. And being on TextDrive means that you’d better know what you’re doing. A read through Mark G. Sobell’s A Practical Guide to Linux ($26) helped quite a bit.
Depending on what your hosting company supports, you can serve up your app on Apache or a third-party web server like Lighttpd. All of my public Rails apps run on lighty, and I’m blown away by its speed. But, again, no warm fuzzy GUI here, just curl up with some good documentation.
That’s about it for now. Anyone else have experiences they’d like to share?



I'm only at the 'head-first' part. I'll let you know what else I'd add to this :)
Still feeling my way too - I'd just add that the free MySQL tools Query Browser, Administrator and, as of a couple of weeks ago, Workbench are well worth a look before you fork out money on MySQL managment software.
Bob
I've made pretty much the same transistion as you, although my current toolset is slightly different.
IDE - Currently RadRails and loving it. Not perfect, but the best of the rest. I've also toyed with Komodo and general text editors. For a while I was doing all my work inside Cygwin + gVim, but I ran into some problems with RMagick so I ditched it.
Source Control - I've always used subversion. It's worth it's weight in gold!
Database - I prefer Postgresql to MySQL, but I've also done some Rails work with SQL Server. Migrations are fantastic. I use a combination of (basic) data functionality in RadRails, the psql client and Aqua Data Studio to work with my databases. I've also looked at Quantum DB, but I can't figure out how to install it in RadRails.
You missed one off your initial list - automation. I used NAnt for my .NET work, and I'm now getting to grips with rake.
After the initial learning curve, I now feel I'm much more productive with Rails than I was with ASP.NET.
The intelligible objects in space and time are by their very nature contradictory.