Re: [NWRUG] Help With Some Puma Warnings

2024-01-27 Thread Will Jessop
To save you some time it should just be a case of: 1. installing direnv (brew install direnv) 2. move the .env file contents to the .envrc in the project root (with some minor formatting tweaks) 3. running `direnv allow` in the project root Unless you're using envrc in production (which I wouldn

Re: [NWRUG] Help With Some Puma Warnings

2024-01-27 Thread 'Rob Whittaker' via North West Ruby User Group (NWRUG)
It may be the Baader-Meinhof effect, but I've seen more mentions of direnv over the last day than I have ever before. I've added a card to my backlog to investigate swapping out dotenv. Thank you all for all your help. You've pointed me in the right direction. If any of you wanted to give a

Re: [NWRUG] Help With Some Puma Warnings

2024-01-26 Thread Lee Hambley
+10 to what Will said. Using a _Gem_ to load env config is a pretty big violation of the "outside in" principal of environment variables. In principal environment variables are mapped into a processes memory space. >From Wikipedia: In all Unix and Unix-like >

Re: [NWRUG] Help With Some Puma Warnings

2024-01-26 Thread 'Rob Whittaker' via North West Ruby User Group (NWRUG)
You make some excellent points, Will. Your approach is something I will consider over the longer term. I plan to pinch these lines from Rails' default Puma config

Re: [NWRUG] Help With Some Puma Warnings

2024-01-25 Thread Will Jessop
I highly recommend installing direnv (https://direnv.net/, available in homebrew) instead of using the dotenv gem and .env files. I've seen the sort of confusion you have had /repeatedly/ over the years with dotenv as it doesn't actually provide an environment at all, it's mis-named. direnv actu

Re: [NWRUG] Help With Some Puma Warnings

2024-01-25 Thread 'Rob Whittaker' via North West Ruby User Group (NWRUG)
Thank you both for your comments. Much of what Lee said went over my head and made me realise how little I know about Puma. I have always accepted that it's the tool to use since it gained popularity. Some stuff went in, but now I want to learn more. After Tekin's comments about rails s, I

Re: [NWRUG] Help With Some Puma Warnings

2024-01-24 Thread Tekin Süleyman
> On 24 Jan 2024, at 06:34, 'Rob Whittaker' via North West Ruby User Group > (NWRUG) wrote: > > Hey, everybody! > > I have a side project of getting my first proper Rails app > up to date. The last time I touched > the project was about six years ago.

Re: [NWRUG] Help With Some Puma Warnings

2024-01-24 Thread Lee Hambley
WARNING: Detected 5 Thread(s) started in app boot: I suspect this is because threads behave like file handles, and forked processes inherit and share file handles. In the Puma case, I'd imagine that this means you have `n` processes sharing the same thread for AR connection pool, some file watche

[NWRUG] Help With Some Puma Warnings

2024-01-23 Thread 'Rob Whittaker' via North West Ruby User Group (NWRUG)
Hey, everybody! I have a side project of getting my first proper Rails app up to date. The last time I touched the project was about six years ago. Ruby, Rails, and all the other gems are out of date. I'm trying to be sensible and "safe" in my approach