Thursday, October 25, 2007

Running Multiple servers

Now this really isn't a hack for rails or a fix. Its a nice little thing built into rails that I just started using. Its running multiple rails programs on a localhost for testing.
Basically, the jist is you can run several RoR servers on the same computer as long as the ports are different.

To achieve this when you run a RoR server with the command :
ruby script/server
you can add a port option by adding -p and specifying the port number:
ruby script/server -p 3001

the default port is 3000, and you can't run multiple servers on a localhost without specifiying a port.

you can also use :Rserver -p 3001 if you are running it on Vim

No comments: