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?
Start your consecutive applications like:
rails s -p 3001 -P tmp/pids/server_2.pid
Credit: https://stackoverflow.com/a/14446920/1376448
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With