Why Rails Parallel Tests Hang Forever on a Postgres Lock

bin/rails test stopped printing and never finished. Not a failure. Not a stack trace. The log just froze mid-run, and the parent process sat at 0% CPU: Running 2014 tests in parallel using 10 …

Create a Captcha with rubyvips, Then Read It Back in Ruby

One of my Rails apps logs into a third-party portal on a schedule. That portal puts a captcha in front of every login: a 290x80 PNG, six glyphs, drawn over a fixed background texture. A human types …

Ruby Gotcha: Environment Variables Are Always Strings

I recently ran into a small but frustrating production bug caused by a common Ruby mistake. I had a feature controlled by an environment variable: DISABLE_THING=false The application restarted …