As I’ve posted before, I’ve been trying to help my pastor with a church management system written in Rails, but I’ve been hitting some roadblocks. First, I tried developing on my Mac Mini, since Macs are what all the cool kids use to develop for Rails. Well, that Mini ended up being a media machine, and developing using a television as a monitor was not very pleasant. It’s not an HDTV, and so only capable of 800×600, but even at that resolution, the screen is practically unreadable.
The most convenient thing for me to do would be to develop on my laptop, since I can take it with me and work with Lowell (my pastor) up at the church on the system when I have problems. So, I started trying to get the app set up on my Windows machine. This actually worked fine for a while, but then Lowell ended up adding a couple of gems called “starling” and “workling” that basically create a task queue that you can farm out long-running tasks to. It works great on Lowell’s Mac and in the production environment. However, I soon discovered that starling uses “fork()” to achieve its ends, which meant a no-go for me on my Windows machine.
Since I can’t exactly install OSX on my laptop, the only option left was Linux. As I’ve written about before, at one point I had Ubuntu installed on a partition on my laptop, so I’d been down that road before. However, I had actually recently removed the Linux install, since I really wasn’t doing anything with it, so I had to go through the install process again (which is actually not all that bad on Ubuntu, for what it’s worth). I installed Ubuntu version 8.10 (Intrepid Ibex) on a 15 Gb partition and began the environment setup process.
The very next day at work, a coworker happened to mention a virtualization tool he was using called VirtualBox. I can’t believe I hadn’t heard about this thing before. I knew about Virtual PC, which Microsoft now gives away for free, but that obviously only allows Windows guest OSes. VMWare does have a free VM “player” that supports different kinds of guests that they give away, but as far as I know the tools you have to use to create a VM cost money. VirtualBox, developed by Sun, is completely free and allows for a whole slew of both host and guest OSes. Anywho, I gave it a try, and I was very impressed. It’s quite performant, and has support for just about everything I think I’d want (networking, USB devices, etc). Another nice feature is that the virtual disk file can be set up to grow dynamically so that the VM is only taking up the space it needs; no more, no less.
It then became obvious that the 15 Gb partition I was using for my Ubuntu install was kind of a waste of space. So I started the process of removing the partition I had added just days before. I want to record what I did to achieve this, mostly as a record for myself in case I need to do it again later. I used a free tool called GParted, which comes as a bootable CD image, to delete the partition Ubuntu was installed on and resize the main partition to take up the newly freed space. After that comes the part that I usually forget, which is fix the master boot record. When you install Ubuntu, you get this thing called GRUB, which is a boot loader that will let you choose which OS to boot up when you turn on your machine. When you delete the partition with Linux on it, GRUB freaks out and won’t load up an OS. To fix this, you need your Windows install CD. Boot from the CD, then (depending on your version of Windows) either start a Recovery Console (XP), or choose “Repair Computer” and then open a console (Vista). On XP, type “fixmbr” (no quotes), and on Vista, type “bootrec /FixMbr” (again, no quotes). This will repair your master boot record, and you should be all set after a restart.
Since I’ve been having all this fun the past couple of evenings, I have not gotten as much sleep as I need. I’m greatly looking forward to the two holidays off work I’ve got coming, as I’m sure you all are. I hope everyone has a happy Thanksgiving!