Automating Tailwind Builds with Kamal Post-Deploy Hooks

I was recently working on a Sinatra-based web app. Some backend pages used Tailwind CSS, so I had to compile Tailwind assets after every change. I was deploying the API with Kamal, and every time I deployed, I had to run the Tailwind build command by hand: bundle exec rake tailwind:build That got old pretty fast, especially when I was deploying often during development. Automating with Post-Deploy Hooks I wanted to automate this so Tailwind assets would build after every deployment. After digging a bit, I found post-deploy hooks in Kamal. ...

January 5, 2026 · Mausam Pun

Setting Up CI for a Multi-Database Rails App When One DB Is Read-Only

🚨 The Problem Everything worked fine locally, but CI kept failing. I was working on a Rails application that used two databases: A primary database (fully controlled by the app) A secondary database (owned by a different application) The catch was this: 👉 The secondary database was read-only from my app’s perspective. Locally, this was not a problem because the database already existed and had the expected schema. But in CI: ...

December 19, 2025 · Mausam Pun

Optimizing Slack API Usage in a Rails App with Caching

🚨 The Problem I was working on a Rails app that used Slack for two main things: Mapping Slack users to our HR app Sending notifications to Slack users or channels Everything looked fine locally, but in staging and production Slack rate-limit errors (429 Too Many Requests) started showing up: Mapping users required fetching the Slack user list repeatedly Sending notifications in bulk triggered multiple API requests in a short time Some requests failed, causing unreliable notifications and mapping 🔍 Root Cause Slack has strict rate limits for each API method. ...

October 23, 2025 · Mausam Pun