So here is the final deal (on ubuntu Dapper) -
1. Get the ruby-gnome2-all package from here
2. Get the firefox-dev package using apt-get. (Note this is required for building the gtkmozembed.)
3. Get the moz-snapshooter.rb
4. Edit it to your needs
5. Fire ruby moz-snapshooter.rb
Most of the things just work out of the box.
Now comes a little tricky part. All of this requires an X server running. So what if one wants to run it on a headless X server? The answer is Xvfb (which is a virtual frame buffer based X server.) Continuing further.
6. Install Xvfb using apt-get.
7. Finally run the 'ruby moz-snapshooter.rb' inside 'xvfb-run' as follows
xvfb-run -s "-screen 800x600x16" ruby moz-snapshooter.rb
Note to pass -s "-screen 800x600x16" option, since most of the websites work well in that resolution.
Caveats:
1. The libgtk-mozembed-ruby package that comes for 'ubuntu' uses the gtkembed.so library provided by mozilla 1.7.X (which is not compiled with pango renderer. It is better to use firefox-dev library and hence build by hand the ruby-gnome2-all package.)
2. The final output resolution image should be of smaller resolution than the one passed to xvfb-run.
3. This is not 'perfect' yet, but a good starting point.
Here are some samples.
1. Google in 150x100 resolution -

2. paahijen.com in 320x200 resolution -

3. Marathi wikipedia in 640x480 resolution -

References :
1. A pygtk implementation by Andrew McCall
2. moz-snapshooter.rb by Mirko Maischberger
3. Ideum screenshot capture prototype