Thursday, April 13, 2006

Lessons Learned: Migrating Ruby on Rails Apps from Linux to Windows

I spent 8 hours last weekend getting Dressr to work on my Windows laptop. This was way too long. Even if none of the issues were major, they just added up to a lot of time, so I wanted to document them here.

I was using InstantRails, which I was cursing, but in retrospect only 1 of my issues was an InstantRails issue.

1) Make sure your SCGI port configuration is a different port than the applications installed with InstallRails by default. (You may not be using them, but that doesn't mean they aren't running.... I wasn't getting any messages in my Rails log because it was all writing to another app's log!)

2) Make sure you install all your mixins. You'd figure this one out pretty quickly on your own.

3) Change all the paths pointing to Ruby. This one actually takes a while to figure out, and the path shows up in a number of places:
public/dispatch.fcgi:#!/usr/bin/ruby18
public/dispatch.rb:#!/usr/bin/ruby18
public/dispatch.cgi:#!/usr/bin/ruby18
script/console:#!/usr/bin/ruby18 -w
script/destroy:#!/usr/bin/ruby18 -w
script/generate:#!/usr/bin/ruby18
script/breakpointer:#!/usr/bin/ruby18 -w
script/server:#!/usr/bin/ruby18
script/runner:#!/usr/bin/ruby18
script/process/spawner:#!/usr/bin/ruby18
script/process/spinner:#!/usr/bin/ruby18
script/process/reaper:#!/usr/bin/ruby18
script/performance/benchmarker:#!/usr/bin/ruby18
script/performance/profiler:#!/usr/bin/ruby18


4) If your files have tabs in them, they need to be removed. (Yes, I know, bad programming style.... I'm now using RadRails, so that isn't a problem anymore.) You can use something along these lines to replace the tabs:
sed -e 's/\t/ /' test > test

After working through these, my app finally worked. Ben and I had a discussion on whether it would have been better to just have checked out the "app" directory, without all the other directories. (Would have had to copy those directories from the sample apps, but I suspect there would have been fewer changes. Hard to tell at this point.)
(Non) dieting trick I'm going to try to integrate into my life:

Think on a scale of 1 to 10. One is "I'm starving to death." 10 is "I'm stuffed." When you are at a 5 or 6, you are satisfied. Don't go up to an 8.

From via Dr. Steven R. Hawks, via Latina Magazine

Wednesday, April 12, 2006

Women on Rails

This is the running list I'm keeping of women working in the Rails community. Who knows, maybe one day we'll meet in the ladies room at some conference.

Amy Hoy -- Amy's Part III
Anna Chan -- contributor to Rails (ActiveRecord stuff)

Monday, April 10, 2006

Two kid related businesses that someone (not me!) should start in Austin: