Remove 12002 from


How can i remove 12002 from the URL i am using ruby on rails. I just need to have my url

Please help me on this

Well, I suppose the snarky answer is run your listener on port 80 (the default for the http protocol), but since that may not be helpful, let me guess what you really need.

You're in a controller and want to construct that URI from the request:


If you replaced with request.host_with_port you'd get the equivalent of request.url


Rob Biedenharn

actually i need to type the whole thing for the server to come up is there any way where i can get the server up just by typing and on more question what exactly this 12002 mean, is it a port on which my rails application running?

Yes, that is the port. You'd need to specify that mongrel or thin or
whatever listens on port 80 or, if Apache is listening on port 80,
proxies the requests through to that port (or, more likely, using a
proxy balancer to hit a small number of instances of your rails
application on consecutive ports).