This blog is moved to


I have moved this blog to . I will continue posting at, not on

Kindly update your book marks to

and .

I am really very sorry for inconvenience.

December 2, 2006 at 7:15 pm 7 comments

Ajax based drag drop and sortable tree for Rails

My friend sur wrote and shares his code for Ajax based drag drop sortable tree for rails. He is also trying to pluginize this, and soon it will be publicly available. Find more detail here.

November 25, 2006 at 1:06 pm 5 comments

Uploading files using AJAX

There is no way to upload files using AJAX. How Gmail does it then? Well, the answer is using <iframe>. Here is a post that describe this technique in detail. Infact we are using this technique from months, obviously inspired by Gmail. ;-)

update: Technically speaking, it’s not Ajax. Just an iframe hack. You are absolutly right Pratik.


November 20, 2006 at 6:26 pm 8 comments

Cheat Sheet

  • Capistrano1.2.0 cheat sheet here.
  • REST cheat sheet here.
  • Rails cheat sheet here.
  • Rails testing cheat sheet here.

November 10, 2006 at 7:13 pm Leave a comment

Deprecated Method in ActionView::Helpers::PrototypeHelper

Prototype helper method update_element_function is deprecated now, Please use RJS instead.

November 9, 2006 at 1:40 pm Leave a comment

Installing subversion from pre-compiled packages or source code

What is subversion(svn):

Subversion is an open source version control system used for keep track of change to source code. Subversion manages files and directories over time an increments revision made to the file system. A tree of file is placed into a central repository. The repository is much like an ordinary file server, except that it remembers every change ever made to your files and directories. This allows you to recover older version of your date or examine the history of how your data changed.

Subversion can access its repository across networks, which allows it to be used by people on different computers. At some level, the ability for various people to modify and manage the same set of data from their respective locations fosters collaboration.


There are two types of installation:

  1. Installation from pre-compiled packages
  2. Installation from source code

Installation from packages:

For RedHat Linux(or other Linux distributions which supports RPM) download subversion RPM package and install. See manual of rpm utility for installation.

For Debian Linux issue apt-get install subversion and by confirming the installation you are done. I also recommend to install subversion-tools by issuing apt-get install subversion-tools.

Installation from source:

Installation from source code is slightly tricky. First of all download latest version of subversion code from

Now extract source to your preferred directory (lets assume /home/testuser/svncode/), and issue the following command in sequence after switching to svncode directory:

  • ./configure
  • make
  • make install

./configure will create Makefile

make makes Subversion form the just-created Makefile
make install install Subversion if make is successfullyAnd you are done….

Issue svnadmin create /home/testuser/repository to create a new repository, this should create a directory structure like:

drwxrwxrwx   7 root root 4096 2006-11-07 17:18 .
drwxrwxrwx  14 root root 4096 2006-11-07 17:18 ..
drwxrwxrwx   2 root root 4096 2006-11-07 17:18 con drwxrwxrwx   2 root root 4096 2006-11-07 17:18 dav drwxrwxrwx   2 root root 4096 2006-11-07 17:18 db
-rwxrwxrwx   1 root root    2 2006-11-07 17:18 format
drwxrwxrwx   2 root root 4096 2006-11-07 17:18 hooks
drwxrwxrwx   2 root root 4096 2006-11-07 17:18 locks
-rwxrwxrwx   1 root root  379 2006-11-07 17:18 README.txt

Now we need to allow remote access to it so that users can import their files. By editing conf/svnserve.conf we can set user accounts, permissions.

Initially svnserve.conf looks like:

### This file controls the configuration of the svnserve daemon, if you
### use it to allow access to this repository.  (If you only allow
### access through http: and/or file: URLs, then this file is
### irrelevant.)
### Visit for more information.
### [general]
### These options control access to the repository for unauthenticated
### and authenticated users.  Valid values are "write", "read",
### and "none".  The sample settings below are the defaults.
### anon-access = write
### auth-access = write
### The password-db option controls the location of the password
### database file.  Unless you specify a path starting with a /,
### the file's location is relative to the conf directory.
### The format of the password database is similar to this file.
### It contains one section labelled [users]. The name and
### password for each user follow, one account per line. The
### format is
### Please note that both the user name and password are case
### sensitive. There is no default for the password file.
### password-db = passwd ### This option specifies the authentication realm of the repository. ### If two repositories have the same authentication realm, they should ### have the same password database, and vice versa.  The default realm ### is repository's uuid.
### realm = My First Repository

Uncomment line containing [general], anon-access, auth-access and password-db with suitable permissions. Also add file named passwd parallel to svnserve.conf containing


You can add as many users you want. Now you are done with user accounts and permissions.

Next you have to start the svnserver by issuing svnserve -d -r /home/testuser/repository.

Now you are ready with your subversion server, you can access your repository from svn://

On some systems (like Debian GNU/Linux) this requires to write an init script so that the server starts up every time the system is rebooted. This could be done by creating a file called svnserve in the /etc/init.d directory, and then editing it to look like the following example file:

#! /bin/sh
DAEMON=/usr/bin/svnserve NAME=svnserve DESC="SVN Repository Server Daemon"
test -x $DAEMON || exit 0
OPTIONS="-d -r /cvs/src"
# Get lsb functions
#. /lib/lsb/init-functions
. /etc/default/rcS start() {        echo "Starting $DESC... "
       #       echo "Starting $DESC: "
       if ! start-stop-daemon --start --quiet --oknodo --exec $DAEMON -- $OPTIONS
>/dev/null 2>&1; then
               echo $status
               return $status
       fi        log_end_msg 0
       return 0
case "$1" in
       echo "Stopping $DESC: "
       start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
       echo $?
       $0 stop
       sleep 1
       #echo "$NAME."
       echo "Usage: $N {start|stop|restart|force-reload}" >&2
       exit 1
esac exit 0

This script also allows to manually start and stop the svnserver service whenever needed. Note: be sure and change the OPTIONS line to reflect the location of your repository; in our previous example this location was /home/testuser/repository. Once this file is created and edited to look like the previous example, you need to chmod the script to be executable by issuing chmod +x /etc/init.d/svnserve and also set it to startup at boot time by issuing update-rc.d svnserve defaults

Now simply start/stop the service by issuing:

/etc/init.d/svnserve start/stop

Please refer Subversion book for more help and usage.

November 7, 2006 at 9:11 pm 1 comment

Deprecated FormTagHelpers

Following FormTagHelpers are deprecated and will be removed in Rails 1.2

  • start_form_tag (use form_tag instead)
  • end_form_tag (use </form> instead)

technorati tags: , , rubyonrails

November 4, 2006 at 10:53 am Leave a comment

Animator.js: A javascript library by Bernie Sumption

While surfing on net I came across a javascript library(animator.js) based on prototype library written by Bernie Sumption.

I found this library a bit interesting. One that appeals me is the ability to define start state and end state through CSS

See in action here.

November 3, 2006 at 7:14 pm 1 comment

Customized Google search engine for ruby on rails(ROR)

Today Ritu Kamthan created a search engine for RubyOnRails (powered by Google Co-op)

Presently it searches over following sites:

If you are a regular rails blogger and wanna add your site to this list, please let me or Ritu know, so that we can include your site.

October 26, 2006 at 1:06 pm 3 comments

My new HP Pavillion DV2117 Notebook

lap31.JPGMy new Notebook


Intel Core Duo Processor 1.66 GHz, Intel 945GM Chipset, 2 MB L2 Cache / 533 MHz lap11.jpgFSB, 1 GB PC2-4200 (533 MHz) DDR2, 100 GB Serial ATA, 150 MB/ Sec @5400 RPM, 8X SuperMulti Double Layer (8.5 GB) DVD +RW/ +R Writer, Intel Graphics Media Accelerator (GMA) 950; DVMT 3.0 – Up to 128 MB, 14.1″ WideScreen (WXGA) with BrightView Technology, Windows XP Media Center Edition, 1 year limited global warranty, Integrated Bluetooth HP Module, IEEE 802.15 Standard, Integrated 802.11a/b/g, Intel Pro/Wireless 3945ABG, Altec Lansing Stereo Speakers, 5-In-1 Digital Media Reader (Secure Digital, Multi-media card, Memory stick, Memory stick pro and xD picture card), Integrated 56K Modem, HP Imprint Finish – Wave Pattern, Capacitive Buttons – Backlit with touch technology, 2 Headphone Jacks, Wired Headset, HP QuickPlay Direct, HP Mobile ExpressCard Remote Control, Integrated 1.3 Megapixel webcam, Microphones, Next Gen Express Card/54 Slot, Norton Antivirus and Norton Internet Security 2006 (Includes 60 days live updates)

October 18, 2006 at 12:26 pm 35 comments

Older Posts

Important Notice…

I have moved this blog to . I will continue posting at, not on

Kindly update your book marks to

and .

I am really very sorry for inconvenience.

Comming Soon….

Domain for Sale

(Contact me)


November 2022


  • Add to Google
  • Subscribe in NewsGator Online
  • Subscribe with Bloglines
  • WebOnRails on feedburner
  • technorati


Flickr Photos

Visitor’s Location

Blog Stats

  • 18,467 hits