In Rails 2.3, I could just use HOST to get my hostname but it seems it's not available anymore. What can I use instead?

I just want something that returns localhost:xxxx (with real port number) when I run the code from my machine, and http://www.mysite.com when I run it in production.

Edit
Report