How to change the url (from localhostL:3000) to (example.com)

I am new to ruby on rails and running rails 2.3.5.My application is
running at localhost:3000 ,but i want it should be run at
example.com” in brower when i start the serve normally as “script/
server” .
What to do?

Thanks

I am very new to rails as well, but I am pretty sure that’s not possible
in development mode, and why would you want to do it, developing under
local is much faster than having to update your server files every time.
You would have to deploy it to change the url that its under, like get a
server. Or you can just play around with Heroku, they offer free
deployment for testing.