Migrating from Elasticsearch to Opensearch: searchkick instructions (without downtime!)

Zero-downtime migration from Elasticsearch to OpenSearch for Searchkick apps, including staging validation, client switching, and environment-specific index settings.

An incomplete guide to migrate a Rails application from paperclip to carrierwave

Rails file storage migration with background jobs, reruns, and URL rewrites; large media backfills need careful testing, queue tuning, and fallback handling.

Jasmine: Testing if two arrays contain the same elements

Array comparisons in Jasmine need different matchers for exact order, unordered equality, or subset checks when testing collections.

ActiveRecord: Cleaning up your database with ignored_colums

Unused database columns confuse teams and can linger safely while legacy access is phased out. ignored_columns removes Rails accessors and helps flag fields for later removal.

Do not use transparent PNGs for iOS favicons

Transparent apple-touch-icon images on iOS turn black in Safari, so solid backgrounds prevent ugly home-screen and bookmark icons.

Five years of "Today I Learned" from Josh Branchaud

A curated set of 900+ personal programming tips spans Ruby, Rails, Git, Unix, Chrome, and JavaScript, with many small shortcuts for daily development work.

Manually trigger a delegated DOM event

Delegated jQuery events can be hard to fire programmatically for testing; native dispatchEvent with the right event class works better than trigger in many cases.

Video transcoding: Web and native playback overview (April 2020)

Browser video playback depends on container and codec support; MP4 with H.264 and AAC works broadly, while WebM can serve modern clients and downloads need native playback support.

Custom RSpec matcher for allowed values (or assignable_values)

Custom RSpec matcher for checking allowed association values, useful when validating assignable_values on model associations.

Test your CSS rendering output with GreenOnion

Front-end styling regressions are hard to catch in views and pages. GreenOnion stores browser snapshots and compares them with diff images or percentage differences.

Git diff: Deemphasizing code that was only moved around

Long diffs can hide real edits inside large code moves; git diff --color-moved=dimmed-zebra dims unchanged moved lines and highlights changes.

Use CSS "text-overflow" to truncate long texts

Single-line text can overflow its container in Rails views; text-overflow: ellipsis and white-space: nowrap produce cleaner truncation in supported browsers.

Rails: Rest API post-mortem analysis

Rails API backends can be fast and easy to extend, but serializer maintenance, schema drift, documentation limits, and missing rate limits create real operational risks.

RSpec's hash_including matcher does not support nesting

hash_including cannot match nested hashes reliably; use nested matchers such as include or another hash_including for partial hash checks.

Jasmine: using async/await to write asynchronous specs

Readable Jasmine specs can use async/await for promises, async setup, event waiting, and controllable async spies instead of done callbacks.

Why preloading associations "randomly" uses joined tables or multiple queries

ActiveRecord :include can switch between separate queries and SQL joins, causing ambiguous ORDER BY clauses and hidden production bugs when associations are preloaded.

Ruby bug: Symbolized Strings Break Keyword Arguments in Ruby 2.2

Dynamically created symbols can make keyword arguments turn nil in Ruby 2.2 when a method uses several keywords and **options.

Debug SAML in development using a local keycloak server

Local Keycloak can emulate a SAML identity provider for development, letting SSO flows and attribute mapping be tested without waiting on an external IDP.

makandra/gemika: Helpers for testing Ruby gems

A library for testing a Ruby gem against multiple Ruby, dependency and database combinations, with shared local and CI setup for full permutation coverage.

What we know about PDFKit

PDF generation from Rails uses a WebKit-based wrapper around wkhtmltopdf, with print styling, headers, footers, and binary-version pitfalls.

Rspec 3: what to do when `describe` is undefined

RSpec 3 can raise undefined method 'describe' for main:Object when DSL methods are not exposed globally; disable_monkey_patching! turns them off, and expose_dsl_globally = true restores them.

Sass: How to get rid of deprecation warnings in dependencies

Sass 1.35.0 can suppress dependency deprecation warnings with quietDeps and limit warnings in your own code with silenceDeprecations.

Using before(:context) / before(:all) in RSpec will cause you lots of trouble unless you know what you are doing

before(:context) in RSpec runs once outside transactions and can leak data between examples; before(:example) keeps specs isolated and safer.

ActiveType::Object: Be careful when overriding the initialize method

Overriding initialize in ActiveType::Object can break ActiveRecord-style setup, freeze instances, or cause argument errors unless super is called with one attribute hash.