

Rails Tip - When Puma Doesn't Run on the Specified Port
source link: https://fuzzyblog.io/blog/rails/2017/04/05/rails-tip-when-puma-doesn-t-run-on-the-specified-port.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Rails Tip - When Puma Doesn't Run on the Specified Port
Apr 5, 2017
So I just noticed this particular oddness:
12:12 $ bundle exec rails s -p4000
=> Booting Puma
=> Rails 5.0.1 application starting in development on http://localhost:4000
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.7.0 (ruby 2.3.1-p112), codename: Snowy Sagebrush
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://0.0.0.0:3000
As you can see Puma is being started with a port 4000 directive but it is actually listening on the default 3000 port.
A bit of googling led me to this bit of text in a Github issue:
After updating the gem version and bundling: gem 'puma', '~> 3.6.2' More…
I edited my Gemfile and replaced:
gem 'puma', '~> 3.0'
with:
gem 'puma', '~> 3.6.2'
A quick bundle install and then another rails s -p4000 gives:
bundle exec rails s -p4000
=> Booting Puma
=> Rails 5.0.1 application starting in development on http://localhost:4000
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.6.2 (ruby 2.3.1-p112), codename: Sleepy Sunday Serenity
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://localhost:4000
As with all http testing, a curl -I is always handy for figuring out if things are working:
curl -I http://localhost:4000/
HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: text/html; charset=utf-8
ETag: W/"c06ad854cb732d5ed93f13e0e4a601ac"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 85a07f99-f8b3-4692-aaa5-4f7c8327d901
X-Runtime: 0.032369
Recommend
-
42
Here’s the setup: You are a web server named Puma. You need to accept incoming connections and give them to your thread pool, but before we can get that far, you’ll have to make sure all of the request’s packets have been...
-
45
七十一岁的PUMA,正在“返老还童”。
-
5
部署 puma 后 Gemfile 没有刷新 前段时间在使用 puma 时遇到一个大坑,相信很多人以后也会碰到。 我的某个项目的生产环境这个配置的: puma mode:cluster worker: 4 thread: 8,32 部署工具: capistra...
-
7
【2021年登山队】探班贴 [复制链接] 分享: 楼主 ...
-
9
Ford reveals the Puma ST Gold Edition designed by fans
-
11
New issue Puma is the only option used for the web server #42998
-
11
Puma is releasing official 'Animal Crossing' sneakers and clothingThe range includes a Wild Rider silhouette and a hoodie.
-
4
Programmable Unified Memory Architecture (PUMA)533 viewsJul 16, 2020 by Stijn Eyerman At: FOS...
-
9
彪马注册ENS域名,推特账号更名为Puma.ethCointelegraph中文2022-02-23热度: 8421这家体育公司将ENS域名加入到其不断增长的NFT收藏中,与耐...
-
5
es报错:doesn’t match any of the locations specified by path.repo 精选 原创
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK