Apache Tika: Performance-optimized configuration for hybrid PDFs (Text + OCR)

Hybrid PDFs can trigger duplicate text and very slow OCR in Apache Tika when page images and layout fragments are processed indiscriminately. A size threshold keeps OCR focused on real content while preserving digital text extraction.

Webservice to mock HTTP responses

Need a simple way to fake server replies during development when external APIs are unavailable or unreliable.

Configuring Webpacker deployments with Capistrano

Rails deployments with Webpacker and Capistrano often need asset-path, manifest, and compile-time tweaks to avoid slow releases and unused compression output.

Install the Nokogiri gem on Ubuntu servers

You need to install the following packages before you can build the Nokogiri gem:

sudo apt-get install libxml2-dev libxslt1-dev

Fixing flaky E2E tests

E2E tests often fail from race conditions between browser, app, and test script; synchronizing actions, retries, and test environment settings improves stability.

weighttp - a lightweight and simple webserver benchmarking tool

Threaded web server benchmark can exhaust application resources more effectively than ApacheBench or httperf; libev is required for installation.

Netty - the Java NIO Client Server Socket Framework - JBoss Community

The Netty project is an effort to provide an asynchronous event-driven network application framework and tools for rapid development of maintainable high performance & high scalability protocol servers & clients.

Git for Subversion users

Quick Git commands for former Subversion users who need to clone, stage, commit, push, pull, branch, stash, and restore files.

Capistrano: exclude custom bundle groups for production deploy

Custom Bundler groups can still be downloaded during Capistrano deploys, slowing production and staging releases. Exclude unnecessary groups with bundle_without to avoid installing unused gems.

Gatekeeping: Guide for developer

Developer workflow for review-gated changes in Linear and GitLab, with branch, merge, reject, and staging steps to reduce client rejections.

Locally testing a website on its real domain

Use a real production domain in local development for testing embeds, cookie banners, and other domain-allowlisted integrations by mapping it to localhost with HTTPS.

Ruby: A small summary of what return, break and next means for blocks

return, break, and next behave differently in Ruby blocks: one exits the method, one exits the yielding method, and one skips only the current iteration.

How to make changes to a Ruby gem (as a Rails developer)

Ruby gems need manual file loading, multi-version support, and their own release workflow, unlike Rails apps. Safe changes depend on understanding structure, tests, versioning, and packaging.

Sentry Local Logging in Ruby

Local Sentry event logging helps debug error capture and background jobs without sending data to Sentry or affecting production metrics.

Popular mistakes when using nested forms

Common Rails nested form pitfalls include missing accepts_nested_attributes_for, wrong form helper scope, and lost parameters that prevent child records from saving.

How to use pessimistic row locks with ActiveRecord

Concurrent requests can overwrite each other or double-process a change. FOR UPDATE row locking in a transaction makes one request wait while the other completes.

Be very careful with 301 and 308 redirects

301 and 308 redirects can be cached by browsers indefinitely without cache control, making later changes impossible unless users clear their cache.

How to fix broken font collisions in wkhtmltopdf

PDFKit and wkhtmltopdf can ignore CSS font names when font metadata collides, causing one face to dominate or local files to fail. Fixing internal font names or embedding fonts restores proper rendering.

Howto: Create a self-signed certificate

Local HTTPS development often needs a trusted certificate; openssl or mkcert can create self-signed X.509 certificates for testing without browser warnings.

makandra cards: A knowledge base on web development, RoR, and DevOps

Internal knowledge base with best practices for web development, Ruby on Rails, DevOps, and trainee programs, used by developers worldwide to find practical solutions and learning paths.

PSA: Be super careful with complex `eager_load` or `includes` queries

eager_load and includes can explode 1-n association queries into huge cross products, wasting memory. preload uses separate queries and avoids the row multiplication.

4 Lessons Learned Doing Angular on Rails

Experience from building an Angular frontend with a Rails backend, highlighting practical lessons for teams combining a JavaScript client with server-side Ruby on Rails.

fnando/i18n-js

Rails I18n translations become available in JavaScript clients through a small library for sharing locale data outside the server.