Rails のサーバーは以下のコマンドで起動できます。
$ rails server [name] [options]
[name]
mongrelやthinなど (WEBrick以外を指定したい場合のみ指定)
[options]
-p [portnum], --port=[portnum] | ポート番号 | デフォルト : 3000 |
---|---|---|
-b [ipAddr], --binding=[ipAddr] | バインドするIPアドレス | デフォルト : 0.0.0.0 |
-d, --deamon | デーモンとして起動する | デーモンとして起動したrailsサーバーを停止する場合は、ps -ef | grep script/rails でプロセスを確認し、kill -9 [processID] を行う |
-e [env-name], --enviroment=[env-name] | 環境の指定 (production, development, test のどれか) | デフォルト : development |
これでサーバーを起動できます。