Tagged: rails
18 posts tagged with "rails". View all posts →
Turbo Stream Broadcasts Lost on Mobile: My Result Was Ready, the Screen Never Knew
Turbo Stream broadcast not received on mobile? Phones drop the Action Cable websocket when you switch apps. How I added cheap Stimulus pollers as a safety net.
I Emailed 312 Users Who Ignored My App. Their Replies Shipped Three Fixes in 48 Hours.
Dashboards told me retention was bad. Three user replies told me why: a deterministic filter, a cutout model eating clothes, and a quiz field nobody ever saved.
No Budget Cap on a Third-Party API
RapidAPI emailed me that my Amazon data plan was at 100% of its monthly quota. The plan has overage fees and no way to say 'stop at my budget,' so I put the cap in my own code: a Redis counter, a guard before every call, and a cache TTL bumped from 6 hours to 7 days.
My Sidekiq Worker OOM'd Four Times. I Fought It Four Ways Before Buying RAM.
A closet-dump upload burst kept OOM-killing OutfitMaker's Sidekiq worker. I answered with four escalating memory defenses over five days — a semaphore, a downscale, a malloc flag, a concurrency cut — before admitting the real fix was a bigger box. Here's which defenses I kept and which I undid.
The Failed Payments My Database Invented
OutfitMaker's subscriptions table was full of `incomplete` rows that looked exactly like broken checkouts losing me money. Stripe had never heard of any of them. The bug wasn't in my payment flow — it was in what I was counting, and it was pointing me at the wrong leak.
My AI Was Blind in Production for Weeks and Nothing Crashed
OutfitMaker's multimodal outfit suggestions were supposed to look at your actual clothes. In production they were running on text labels alone — 0 out of 25 items reaching the model with an image. No exception, no alert. Just a one-line log and a one-line Dockerfile fix.
Blocking 7,500 Disposable Email Domains
The day after I finally got my conversion rate to be trustworthy, it lied to me again — not a bug this time, but a wave of throwaway-email signups inflating the top of the funnel. The fix was a blocklist, a memoized Set, and one word in a validator: on: :create.
Why Every Funnel Event in My Analytics Read Zero
Pageviews tracked fine, but every funnel milestone in OutfitMaker — Signup, Activation, First Item Uploaded — sat at a flat zero. Three compounding bugs, then a fourth, all hiding behind a dashboard that looked merely quiet instead of broken.
I Added Circuit Breakers to a Rails App and Had to Patch the Gem Twice
Wrapping OutfitMaker's six external API calls in circuit breakers was the easy part. Making breaker_machines actually trip — and actually survive a worker restart — took two monkey patches and a lot of reading the gem's internals.
I Swapped Fashn for Gemini and Discovered Vertex AI Can't Return Images
Replacing OutfitMaker's virtual try-on engine looked like a service-object swap. It turned into a same-day cascade of five fixes, including discovering the Gemini API I was already using can't return images.
A Duplicate Turbo Frame Bug That Broke Three Features Silently
Two turbo-frame elements with the same id, one HTTP response, three dead features in OutfitMaker. No exception, no Honeybadger hit, no console error. Just a click that did nothing.
A TOCTOU Bug in My Gemini Rate Limiter
A read-then-write pattern in OutfitMaker's rate limiter let concurrent requests bypass the daily Gemini quota. The fix compresses to a single atomic increment, but understanding why takes a minute.
PWA Over Native for a Fashion App
Why I chose a Progressive Web App over native iOS/Android for OutfitMaker. Camera access works, installation works, and I don't need Apple's permission.
Rails 8 Migration on a Live Product
Upgrading from Rails 7.1.5 to 8.1 with paying users. The strategy, the gotchas, and why I fixed 103 test failures before touching the Gemfile.
Hotwire Over React for a Solo Dev
Real-time features without a JavaScript framework. How Turbo Streams and Stimulus gave OutfitMaker everything it needed with a fraction of the complexity.
Multimodal AI for Outfit Suggestions
How sending actual photos to Gemini instead of text descriptions transformed OutfitMaker's suggestions from generic to genuinely useful.
My First State Machine in Rails
How OutfitMaker's outfit suggestion flow evolved from nested if/else into a proper state machine. The gem, the gotchas, and why it clarified everything.
Why I Switched from RSpec to Minitest
RSpec felt like too much ceremony for a solo project. Here's how I migrated 341 tests, what broke, and why simpler was better.