LoginSignup
0
1

More than 5 years have passed since last update.

rails sでのエラーの対処法

Posted at

rails s叩くとエラーがでる

$ rails s
=> Booting Puma
=> Rails 5.1.6 application starting in development
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.12.0 (ruby 2.5.0-p0), codename: Llamas in Pajamas
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://0.0.0.0:3000
Exiting
Traceback (most recent call last):
        34: from bin/rails:3:in `<main>'
        33: from bin/rails:3:in `load'
        32: from /Users/iharamoeka/workspace/blog/blog/bin/spring:15:in `<top (required)>'

.
.
.

/Users/iharamoeka/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/puma-3.12.0/lib/puma/binder.rb:272:in `initi
alize': Address already in use - bind(2) for "0.0.0.0" port 3000 (Errno::EADDRINUSE)

原因

ローカルサーバーを起動したままターミナルを消しちゃったことが原因らしい。

解決方法

lsof -i :3000

上記コマンドをうって出てくるものの中で、PID接続しているもののIDを見つける。

kill -QUIT ここにIDをコピペ

これで解決っ☆

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