The server is already running. Check out C: /Rails/tmp/pids/server.pid

Every time I run 2 rails servers on different ports, say 3000 and 3001.

After starting the 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 start the second rail 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 the server.pid file before I can start the rails server on port 3001. Is there a way to avoid this deleting the file every time?

+4
source share
1 answer

Start your serial applications, for example:

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

Credit: fooobar.com/questions/58830 / ...

+16
source

Source: https://habr.com/ru/post/1480203/


All Articles