3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

rails s -d実行後にpidが表示されない時の対処法

Posted at

環境

  • VPSサーバー
  • CentOS7
  • ruby 2.6.3(rbenv)
  • rails 5.2.3

起きたこと

rails s -b 0.0.0.0 -dでrailsのサーバーを起動させた後、下の参考リンクを見ながらps aux | grep railsとしてもgrepのプロセスしか表示されず、railsのPIDを表示できない

参考

rails server -d でバックグラウンドで実行中のプロセスを停止する方法 -Qiita

対処法

ps aux | grep railsではなく、ps aux | grep pumaとすればよかったようです。

これで出てきたPIDをkill -9 の後に入れると、無事railsサーバーを終了することができました。
例)

$ kill -9 1234

こちらのブログのように新しい情報だと、ps aux | grep pumaで紹介されているようです。

3
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
3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?