Rack をバックグランド(daemon)で起動する方法

結論

$ rackup -D

補足

ヘルプを見ましょう。ググるよりもまず公式です。

$ rackup --help
Usage: rackup [ruby options] [rack options] [rackup config]

Ruby options:
  -e, --eval LINE          evaluate a LINE of code
  -b BUILDER_LINE,         evaluate a BUILDER_LINE of code as a builder script
      --builder
  -d, --debug              set debugging flags (set $DEBUG to true)
  -w, --warn               turn warnings on for your script
  -q, --quiet              turn off logging
  -I, --include PATH       specify $LOAD_PATH (may be used more than once)
  -r, --require LIBRARY    require the library, before executing your script

Rack options:
  -s, --server SERVER      serve using SERVER (thin/puma/webrick/mongrel)
  -o, --host HOST          listen on HOST (default: localhost)
  -p, --port PORT          use PORT (default: 9292)
  -O NAME[=VALUE],         pass VALUE to the server as option NAME. If no VALUE, sets it to true. Run '/home/takiya/sinatra-sidekiq/vendor/bundle/ruby/2.5.0/bin/rackup -s SERVER -h' to get a list of options for SERVER
      --option
  -E, --env ENVIRONMENT    use ENVIRONMENT for defaults (default: development)
  -D, --daemonize          run daemonized in the background
  -P, --pid FILE           file to store PID

Common options:
  -h, -?, --help           Show this message
      --version            Show version
Powered by はてなブログ