Tuesday, April 25, 2006

Setting Up a Ruby on Rails Development Environment

All you need to start building Web applications using Ruby on Rails is:
  • Ruby
  • The Rails framework
  • A relational database (MySQL, PostgreSQL, and SQLite are supported, out of the box)
  • Your favorite text editor
Now, when I spent most of my time writing code, my favorite editor was vi. I learned to love vi, and I was very proficient in using it for development. It was simple, fast, and transparent. These days, I squeeze my coding time into a few hours a week, if I'm lucky. As a manager, I have seen the productivity improvements that come from using IDEs like Eclipse and Visual Studio .NET, along with the rich complement of plug-ins that are now available. So, rather than dust off my vi skills, I decided to base my Rails development environment on:
  • Eclipse
  • SubVersion
  • The SubClipse SubVersion Client Plugin for Eclipse
  • The Ruby Developer Tools Plugin for Eclipse
  • The Web Developer Tools Plugin for Eclipse
Some other motivations for choosing Eclipse include:
  • It's free!
  • I'm planning on evaluating a Java-based architecture shortly, and Eclipse is probably the de-facto IDE for Java development.
  • I'm planning on evaluating a LAMP-based architecture shortly, and there are PHP, Perl, and Python plugins available for Eclipse. No matter which 'P' I end up using, I should be covered under Eclipse.
I started with a step-by-step article called Setting up a Rails Development Environment on Windows Using Eclipse, by Brian Hogan. The article covers everything you need to do to setup Ruby, Rails, Eclipse, and the SubVersion plugin for Eclipse. It literally eliminated what I can only guess would be days of learning by trial and error! Thank you!!!

I found another article on the Ruby on Rails site about How To Use Rails With Subversion. It's concise and includes valuable guidelines for what parts of the Rails environment to place under source control.

To test everything out, I built the sample application described in Rolling with Ruby on Rails, by Curt Hibbs. It's the perfect guide, if you're like me and just want to dive into something new, without a clue of what you're getting yourself into!

In all, it took me around two days of effort to find and read all of these articles, install MySQL, setup my development environment, build the sample application, and commit everthing to SubVersion.

No comments: