The Hitchhiker’s Guide to Ruby On Rails Galaxy

Records of my voyage through RoR Galaxy

Archive for September, 2007

Starting multiple instances of WEBrick server from the command line

Posted by arjunghosh on September 6, 2007

Another instance of webrick server running wither another rails app at the same time at another port

As i mentioned in my previous log on starting WEBrick server manually from command line, here i look into the often asked question about starting Multiple instances of WEBrick server at the same time so that multiple Rails application can be run at the same time.

So continuing from my prev log…

Suppose we have to run another test called “AnotherTestRailsApp” beside “TestRailsApp” already running on our machine.

1. Now type the command

ruby script/server -p3001

For example:

“c:\AnotherTestRailsApp> ruby script/server -p9001”

2. Now to also run “AnotherTestRailsApp” rails app can be accessed by going to the address bar of your browser and typing the command at the address bar:

http://localhost:3001/

So here the above Rails app “AnotherTestRailsApp” is running on port 3001 instead of default 3000. This number can be any thing like 3010 or 9000.

3. So we now have one rails app “TestRailsApp” running at port 3000 and another “AnotherTestRailsApp” rails app running at port 3001

Advertisements

Posted in Uncategorized | Tagged: , , , | 4 Comments »

Starting WEBrick Server manualy from the command line

Posted by arjunghosh on September 6, 2007

Example of WEBrick server running at command line

1. First open the command line window. For windows get there by clicking on start->run

2. The following command will open the DOS command windows. Type the following:

cmd

3. Go to the folder which contains the your RoR project using the command:

“c:\> cd TestRailsApp “

4. Now type the command:

ruby script/server” at “c:\TestRailsApp> ruby script/server”

5. This will start the WEBrick Server for the particular application which in above example is TestRailsApp

6. Now this “TestRailsApp” rails app can be accessed by going to the address bar of your browser and typing “http://localhost:3000/”. This will open the default starting page of your application. Now the question is what is number 3000. Well thats the default port 3000 at which the server is running on and hence the application

Thats all from my recent travel through Rails Galaxy…

Posted in Uncategorized | Tagged: , , , | Leave a Comment »

(un)offcial song for Ruby – by Kaiser Chiefs

Posted by arjunghosh on September 3, 2007

Should become the (un)official song for Ruby…what do u say?

Posted in Uncategorized | Tagged: | Leave a Comment »