Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

server is already running. Check C:/Rails/tmp/pids/server.pid [closed]

Every time when I run 2 rails server on different port say 3000 and 3001.

After starting server on port 3000

Rails$ rails s -p 3000 
=> Booting Mongrel
=> Rails 3.1.1 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server

when I run second rails server on port 3001,

Rails$ rails s -p 3001
=> Booting Mongrel
=> Rails 3.1.1 application starting in development on http://0.0.0.0:3001
=> Call with -d to detach
=> Ctrl-C to shutdown server
A server is already running. Check /Rails/tmp/pids/server.pid.
Exiting

I need to delete server.pid file, before I am able to start rails server on port 3001. Is there any way to avoid this deletion of file every time?

like image 315
Ashwini Avatar asked Dec 04 '22 11:12

Ashwini


1 Answers

Start your consecutive applications like:

rails s -p 3001 -P tmp/pids/server_2.pid

Credit: https://stackoverflow.com/a/14446920/1376448

like image 139
kiddorails Avatar answered Dec 26 '22 00:12

kiddorails