WARNING: These instructions are for Facebook version 1 (not Facebooker2). Since last year, I have moved toward using a different gem for this due to Facebooker's lack of documentation. Working on a new blog post detailing that.

So you want to write a Facebook app written in Rails? Well, the good news is that it works. The bad news is that out of the box Facebook didn't quite design their platform to work with some of the core concepts (namely, REST) of Rails.

Nov 192009

This is a work in progress.

Rails Version Release month
2.0.0 Dec 2007
2.0.1 Dec 2007
2.0.2 Dec 2007
2.1.0 May 2008
2.1.1 Sept 2008
2.1.2 Oct 2008
2.2.2 Nov 2008
2.3.2 March 09
2.3.3 July 2009
2.3.4 Sept 2009
2.3.5 recently

strftime() turns a Date or DateTime into nicely formatted output. The following table shows the code you can use to create a nicely formatted date

>> x = DateTime.new(2009,9,5,15,45,50)
=> Sat, 05 Sep 2009 15:45:50 +0000

The default is %F which is the same as writing this.

>> x.strftime('%F')
=> "2009-09-05"

Current timestamp with milliseconds.

#{DateTime.now.strftime('%Y-%m-%d %H:%M:%S + %L')}

Git primer

 Uncategorized  No Responses »
Nov 142009

The is the very bare-bones basics of git.

First, I am staring by assuming that someone else has already setup a git repository on github. If it is a private repository, the author must grant you access to that repository by adding your github account name to the project.

Once this is done, you will see this project under "Your repositories."

Every git project has a git URL associated with it. You will find this URL on the project's page.

If you are getting this error after a Rails 2.3.3 update

undefined method `rewind' for #<TCPSocket:0x3631e58>

Try updating your version of passenger:

sudo gem update passenger

If you see this after a Rails 2.3.3 update, you need to update Phusion passenger update (I was upgrading from Passenger 2.1.3)

sudo gem update passenger
sudo passenger-install-apache2-module

A few CSS techniques used by the pros.

Getting RSS feeds to work right; Firefox error message "This XML file does not appear to have any style information associated with it. The document tree is shown below."

I came across an interesting thing about this particular error message in Firefox, which appears when you try to look at an RSS (or XML, I'll get to that) feed that doesn't work right.

The error you see in Firefox is a warning message at the top of the screen which reads:

© 2012 Tech Notes Suffusion theme by Sayontan Sinha