railsでバックグラウンドプロセスの管理

そんな時はforeman使うといい。

$ gem install foreman

プロジェクトのルートディレクトリにProcfile作成して、管理したいプロセスを記述。

web: bundle exec rails s
mail: mailcatcher

で起動は・・

$ foreman start

・・

11:26:36 mail.1    | started with pid 63721
11:26:36 web.1     | started with pid 63720

Good job!!