building-a-multi-site-supported-application

Was looking for creating subdomains dynamically, and found this one.

I dont know how to set this up in my linux PC(The eg. is in mac)

http://railstips.org/2006/11/13/building-a-multi-site-supported-application

Any help is appreciated

I would like to dynamically add sub-domains without any server setups
in between.