Development Environment Setup Complete
I spent all day at ENTS getting started on my new hobby project to build a facebook app. I work in Ruby at Nexopia so it seemed an obvious language choice. I have only dabbled in rails (we wrote our own web framework at nex), but I know enough to get started, so the big thing to figure out was Facebook development.
I started with some extensive googling, with limited success. It seems there historically were two main Facebook gems for rails, RFacebook, and Facebooker. Facebooker as best I could determine seems to have taken over entirely, but its tutorial information seems largely broken and out of date (where it even exists). The API docs seem okay so far, but I really wanted some higher level getting started information. PeepCode to the rescue. They have a pdf and screencast available for $9 that provided an excellent starting point.
With that information I quickly got my app setup on both Facebook, and a basic set of scaffolding in rails, then reached my next hurdle. Since I needed Facebook to talk to my app to test anything, I needed a public IP for my development code. There are several options to achieve this, and I tried most of them before finally settling. Developing directly off of my VPS was an option, particularly by using sshfs to mount the project files. The problem there is largely performance. Textmate in particular makes the assumption that you have faster file system access than is provided by sshfs. Opening up a local port could have worked as well, but I deal with enough different firewalls moving around that it just isn’t really an option for me. That left ssh tunnelling, which I finally settled on. It’s a bit awkward but it allows instant testing of changes, through Facebook, as you make them. I setup a local mysql server (since Facebook uses 64-bit UIDs Rails requires a special plugin for this, scaring me away from multiple database types), and forwarded port 3000 (the default rails test server port) to my remote server, configuring my Facebook app to look on the non-standard port. Tested a basic rails scaffolding through Facebook and rejoiced happily upon seeing all the default forms working in Facebook blue.
I had hoped to get a bit further in actual development today, but given the awkwardness of getting started with Facebook and Rails I’m happy to be as far along as I am. It was fun hanging out at the ENTS space, met a couple people as they popped in throughout the day. Looking forward to going back tomorrow to start work on implementing a UI.