0
0

More than 3 years have passed since last update.

rails serverをバックグラウンドで実行する

Posted at

コンソールにログを出したくないとき

-d オプションを使う

# 開始するとき
$ rails server -d

# 終了したいとき
$ kill -9 $(cat tmp/pids/server.pid)

コンソールにログを出したいとき

& を使う

# 開始するとき
$ rails server &

# 終了したいとき
$ kill $(jobs | grep rails | sed -e "s/\[\([0-9]*\)\].*/%\1/g")
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0