Server is already running in Rails



  • 4 Answer(s)

    Rails running in follow command: 

    Remove the file: C:/Sites/folder/Pids/Server.pids

    Answered on January 12, 2019.
    Add Comment

    Try this code,

    rails s -p 4000 -P tmp/pids/server2.pid
    

    Running rails s:

    => Booting WEBrick

    => Rails 4.0.4 application starting in development on http://0.0.0.0:3000

    => Run rails server -h for more startup options

    => Ctrl-C to shutdown server

    A server is already running. Check /your_project_path/tmp/pids/server.pid. 

    rm /your_project_path/tmp/pids/server.pid
    

    OR Incase  server was detached then follow below guidelines:

    ps -aef | grep rails
    

    OR by this command:

    sudo lsof -wni tcp:3000
    

    or,

    kill -9 pID
    

    Answered on January 12, 2019.
    Add Comment

    The four digital number that vim C:/Sites/folder/Pids/Server.pidsoutputs is the process id.

    You should kill -9 processid, replacing the process id with the 4 numbers that vim (or other editor) outputed.

    Answered on January 13, 2019.
    Add Comment

    rm <path to file Server.pid>

    Answered on January 13, 2019.
    Add Comment


  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.