« Video card died | Main | Test from Google Docs. »

Rails and Flex

I wrote a little bit about my earliest steps in Ruby on Rails in June. Today, I will start a series of posts that describe what I've done with it lately. Also, I'll slowly be introducing Adobe Flex development into my setup and I'm hoping these two platforms will serve as a good foundation for various projects that I have in mind.

This post will talk about my Rails development environment at home on my Mac and how I plan on publishing my apps to my primordia.com website. It's just an intro post, where detailed steps on everything mentioned here will be the subject of subsequent posts.

My Rig

Here is a summary of how I have things set up:

  • My editor is TextMate, although my friend Rob keeps singing the virtues of the VIM editor and Rails together. Tempting... In any case, TextMate is only available for the Mac, but their is a port planned for Windows in the E Text Editor (beta!). There are some very good screencasts on why TextMate is so loved here.
  • MySQL is used for database work. There are a few reasons for this. For one, it seems like the most popular database backend for Rails development. Second, I have some experience with it. And third, it's the database that I get for free on my public server from Dreamhost. I installed MySQL "Community Server" from the binary, but I had to learn quote a bit before getting things working smoothly. I use MySQL Administrator to administer the database which is a pretty awesome tool.
  • I use Apache as my web server, even during development. Rails developers typically use WEBrick, but the thought of starting it up all of the time and adding the extra port name to my browser kind of bugs me. In an forthcoming Apache-specific post, I'll discuss how I figured out how all of the Aliases and virtual directories are supposed to work.

One option to get all of this working in one step is to use Apache Friends Xampp. Under Windows, for example, you get all of this with one simple setup: Apache, MySQL, PHP + PEAR, Perl, mod_php, mod_perl, mod_ssl, OpenSSL, phpMyAdmin, Webalizer, Mercury Mail Transport System for Win32 and NetWare Systems v3.32, JpGraph, FileZilla FTP Server, mcrypt, eAccelerator, SQLite, and WEB-DAV + mod_auth_mysql.

You get similar functionality on both Mac OS X and Linux. Go for it. Why didn't I use this method? I thought Xampp was only for Windows. Plus, I'm wondering what happens when I have this stuff installed already, in piecemeal. I'm pretty scared to mess with things now. Oh, and there was this warning for Mac and Solaris:

WARNING: This version of XAMPP is still in the first steps of development. Use at you own risk!

Two things don't work yet, but I'm working on it. One is fastcgi. This will allow pages to load faster since I believe Ruby and other "stuff" won't need to be completely reloaded on each page hit. For now, cgi is working find for me.

The second thing I still have yet to get working is subversion. I have a subversion repository set up on my primordia.com server and TextMate even has some integration with subversion. Still, I haven't gotten my Mac to talk to it properly yet. I hope to use subversion as the deployment mechanism for my projects, where code that I check in at home can be sync'd from primordia.com and thus deployed that way. I hope to get this workflow working soon.

So, over the next week or so, you can expect these posts from me:

  • The fun that is TextMate, for Ruby on Rails development
  • MySql Setup, in detail
  • Apache setup, in detail
  • Subversion deployment