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.

Rials 'rails s'でサーバーが起動しない

Last updated at Posted at 2021-05-31

正常終了せずにterminalを閉じた時

今回は、時々あるterminalでローカルサーバーを起動したまま終了して、
再度ローカルサーバーを立ち上げるときにエラーになる時の解決方法です。

解決方法

rails s
でローカルサーバーが立ち上がらない。
原因は、サーバーが起動したままターミナルを閉じるとログが残ったままでエラーになる。
その時は、

lsof -i :3000

で、対象のIDを探す。
そして削除:killをする。

kill -QUIT *PID*
# *PID*には、対象IDの番号を記述する。

終わり。

※参照記事

単純ですが、初めの頃は焦りますよね。
データの保存、終了は丁寧にやることが大事だと改めて思いました。

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?