0
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 1 year has passed since last update.

rails サーバー閉じれてない?? サーバーの立ち上げ

Last updated at Posted at 2023-02-24

コントーロール+C でサーバー閉じれるらしのですが、僕はうまくいきません😭

そんなときに使用している方法がこちら

$lsof -i :3000
COMMAND   PID            USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
ruby    22417        ユーザー名   12u  IPv4    0x7f6d6c      0t0  TCP *:hbci (LISTEN)

こんなものが返ってくる。
ここで出てくるPIDの番号を使用する。

$kill -9 22417

こうするとサーバーを閉じることができます。

$lsof -i :3000

再度、上記を実行しても何も出てこないはずです。

$rails s

その後サーバーを立ち上げれば、無事サーバーの閉じから立ち上げまで完了することができます(^-^)

補足:ずっとコントロール+cができない!と思っていた原因は、コントロールではなく、コマンド+cでやっていました😭

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?