簡體   English   中英

啟動精簡版時-s(或--server)沒有選項-Rails

[英]No option for -s (or --server) on start thin - Rails

根據我已閱讀正確語法的所有文檔,我正在嘗試設置多個瘦服務器(在Windows上運行滑軌),它們是: thin start -s5thin start --server 5 這些都沒有工作,我嘗試了thin -h並獲得了所有可用的命令,它們中的任何一個( -s / --server )都沒有出現在列表中。

我正在使用薄1.6.2代號Doc Brown

編輯

薄-help輸出:

Server options:
    -a, --address HOST               bind to HOST address (default: 0.0.0.0)
    -p, --port PORT                  use PORT (default: 3000)
    -S, --socket FILE                bind to unix domain socket
    -y, --swiftiply [KEY]            Run using swiftiply
    -A, --adapter NAME               Rack adapter to use (default: autodetect)
                                     (rack, rails, ramaze, merb, file)
    -R, --rackup FILE                Load a Rack config file instead of Rack ada
pter
    -c, --chdir DIR                  Change to dir before starting
        --stats PATH                 Mount the Stats adapter under PATH

SSL options:
        --ssl                        Enables SSL
        --ssl-key-file PATH          Path to private key
        --ssl-cert-file PATH         Path to certificate

Adapter options:
    -e, --environment ENV            Framework environment (default: development
)
        --prefix PATH                Mount the app under PATH (start with /)

Tuning options:
    -b, --backend CLASS              Backend to use, full classname
    -t, --timeout SEC                Request or command timeout in sec (default:
 30)
    -f, --force                      Force the execution of the command
        --max-persistent-conns NUM   Maximum number of persistent connections
                                     (default: 100)
        --threaded                   Call the Rack application in threads [exper
imental]
        --threadpool-size NUM        Sets the size of the EventMachine threadpoo
l.
                                     (default: 20)

Common options:
    -r, --require FILE               require the library
    -q, --quiet                      Silence all logging
    -D, --debug                      Enable debug logging
    -V, --trace                      Set tracing on (log raw request/response)
    -h, --help                       Show this message
    -v, --version                    Show version

幫助輸出缺少“ 群集”選項 ,可以在其中添加服務器數量作為選項:

Cluster options:
    -s, --servers NUM                Number of servers to start
    -o, --only NUM                   Send command to only one server of the cluster
    -C, --config FILE                Load options from config file
        --all [DIR]                  Send command to each config files in DIR
    -O, --onebyone                   Restart the cluster one by one (only works with restart command)
    -w, --wait NUM                   Maximum wait time for server to be started in seconds (use with -O)

考慮到這一點,有2個選項可以解決此問題:

  1. Windows不支持
  2. 過時的寶石版本

更新

https://github.com/macournoyer/thin/blob/master/lib/thin/runner.rb#L89

 unless Thin.win? # Daemonizing not supported on Windows

更新2可能對Windows有用的另一個選項:

使用批處理腳本在Windows上啟動Thin Server的多個實例

read help start and try this

start /b thin start
and read again help start and play with other options

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM