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 3 years have passed since last update.

rails s を実行しると"A server is already running."のエラーの対処法

Last updated at Posted at 2020-11-05

rails sを起動しようとすると、このようなエラーが、、、

$ rails s -b 0.0.0.0
=> Booting Puma
=> Rails 5.2.4.2 application starting in development 
=> Run `rails server -h` for more startup options
A server is already running. Check /ディレクトリパス/tmp/pids/server.pid.
Exiting

これはサーバーがすでに実行中のために起こってしまうエラーです。

##server.pidのPIDをkillする
以下のコマンドを実行しする。

$ lsof -i:3000
COMMAND  PID    USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
ruby2.5 3033 vagrant   16u  IPv4  27499      0t0  TCP *:3000 (LISTEN)

上記のPIDの値を以下の値で削除します。

$ kill -9 3033

これで解決できます。

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?