If you’re on MacOS X, you can use this blog post to make it more general:
I have a few domains I set up:
*.specificapplication.rails (this application uses subdomain authentication)
*.dev.rails (this is a general domain I use for all other applications, I use the subdomain part for the application name).
The big advantage of the last one, is that you get a new session for each application.
myapp1.dev.rails:3000 => is logged in
myapp2.dev.rails:4000 => is also logged in
If you’re using localhost as the url for everything, the session is shared if you switch between applications and that can be troublesome at times.
Peter De Berdt