LoginSignup
6
4

More than 5 years have passed since last update.

pumaのバグ?port変更しても強制的に3000をlistenしてしまう時の対処メモ

Last updated at Posted at 2017-02-06

現象

  • サーバ起動オプションでポート3030を指定したのに、listenするポートが3000に変わっている。
$ rails s -p 3030
=> Booting Puma
=> Rails 5.0.1 application starting in development on http://localhost:3030
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.7.0 (ruby 2.4.0-p0), codename: Snowy Sagebrush
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://0.0.0.0:3000
Use Ctrl-C to stop

対処

  • webrickを使ってる時はこんなことはなかった。
  • ググっているといろんな人が「pumaのバグなんじゃないのか?」と言ってる。
  • 一時的にはこのように現象を回避する
env PORT=3030 rails s

これで

* Listening on tcp://0.0.0.0:3030

を得ることができる。

とりあえずメモ。

6
4
4

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
6
4