Running multiple instances of Rails Server

前端 未结 8 587
南笙
南笙 2020-12-14 06:34

I am new to Rails, so please forgive me if this is obvious.

I am doing a lot of experimenting, creating to applications, testing features, etc. It got my first scaff

相关标签:
8条回答
  • 2020-12-14 06:58
    rails s -p 4000 --pid tmp/pids/server2.pid
    

    The above command will safely start a second server in port 4000

    0 讨论(0)
  • 2020-12-14 07:01

    You can run multiple instances of webrick server on localhost by assigning a different port number as:

    rails s -p 3007
    

    But sometimes it may not work.

    I have a tip for you.You can try using this along with other options provided by webrick. Just try with providing any number as PID using -P :

    rails s -p 3007 -P 42342
    
    0 讨论(0)
提交回复
热议问题