CSS: :where() pseudo selector

:where() matches selector lists with zero specificity, simplifying repeated CSS selectors without affecting override behavior; invalid items in the list are ignored.

Rails: How to check if a certain validation failed

Find out whether a Rails validation failed by checking ActiveModel::Errors types instead of messages, which is useful in tests and for validations with extra options.

Generating and streaming ZIP archives on the fly

Large ZIP downloads can start immediately without writing files to disk, using zip_tricks_stream for custom content or zipline for existing attachments.

Cucumber pitfall: "Around" does not apply to your "Background" steps

Around hooks run only after Background steps, so setup or teardown placed there cannot affect background actions. Use Before and After hooks instead.

Valuable Chrome DevTools Shortcuts

Chrome DevTools shortcuts speed up debugging by toggling the console drawer, adjusting style values faster, and manipulating elements without the mouse.

A short overview of common design patterns implemented within Rails

Rails code patterns help communicate refactor requests, improve code reviews, and introduce reusable approaches such as service objects, presenters, and query objects.

makandra tech survey - results

Survey results highlight common desktop environments, shells, command-line tools, editors, and Vim plugins used by the team.

Fix for mysql2 error "Incorrect MySQL client library version! This gem was compiled for x.x.x but the client library is y.y.y."

mysql2 runtime failures can stem from MariaDB/MySQL client library version mismatches on Linux, especially Ubuntu 22.04; LTS branches remove the client-version check.

Reading the Rails session hash from a Rack middleware

Accessing Rails session data inside Rack middleware is possible through env['rack.session'], which provides an ActionDispatch::Request::Session object.

Fixing flaky E2E tests

Flaky end-to-end tests often stem from race conditions between test code, browser state, and JavaScript-heavy UI behavior. Stabilization usually means synchronizing actions, retries, and browser settings.

Fix: esbuild assets are missing after capistrano deploy

esbuild output can disappear after a Capistrano deploy when app/builds is not committed, leaving public/assets incomplete. Sprockets may ignore files in unknown paths.

Writing strings as Carrierwave uploads

CarrierWave needs a filename for string or stream uploads through ActiveRecord; a small StringIO wrapper with original_filename avoids TypeError and works with Zeitwerk.

PostgreSQL: How to show database size

pg_database_size returns a database’s size in bytes; pg_size_pretty formats it into readable units like GB.

The Easiest Way to Parse URLs with JavaScript

Parsing URLs is simpler with an <a> element than with new URL(...), and it also handles incomplete relative paths; IE11 may omit the leading slash.

Icon font vertical alignment in Windows

Icon fonts can line up differently across Windows, Linux and macOS, and vertical-align alone may not fix the baseline mismatch. Adjusting spacing with display:inline-block, padding and margins is often more reliable.

Hiding the clear input button of Edge (with EdgeHTML engine)

Edge and IE11 render a built-in clear button on text inputs that can conflict with custom UI; input::-ms-clear hides it.

Double loading issue with Ruby default gems

Bundler can activate a Ruby default gem before Gemfile.lock is evaluated, causing a version mismatch and Gem::LoadError when a newer installed release is required.

How to debug issues with zeitwerk and Rails

Zeitwerk autoloading problems in Rails can be hard to trace during boot; Rails.autoloaders.log! and bin/rails zeitwerk:check help reveal constant-to-file mapping issues.

Waiting for page loads and AJAX requests to finish with Capybara

Capybara browser tests can fail while page loads or AJAX requests are still pending; waiting for visible results reduces flickering and unreliable assertions.

Project maintenance: four levels of code quality

Code quality determines maintainability, from merely working code to reliable, readable, and changeable code. Long-lived projects need at least readable code; short-lived code can stop at reliable code.

Rails: Remove Blank Values from Collections

Rails collections often retain empty strings, nil, whitespace, empty arrays, hashes, and false values; compact_blank removes them from arrays and hashes in Rails 6.1+.

Ruby constant lookup: The good, the bad and the ugly

Ruby constant resolution can pick the wrong class through namespace fallbacks, causing autoloading bugs and unexpected references in Rails, especially with nested models.

CSS Support Guide for Email Clients

CSS support in e-mail clients is inconsistent, so HTML email styling often breaks across providers. A compatibility overview helps identify unsafe features before sending.

Postgresql: Paginate and count in one query using window functions

High-latency pagination queries can be reduced to one PostgreSQL statement by using COUNT(*) OVER() to return page rows and total rows together.