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.

Upgrading Capybara with deprecated Integer selectors

Capybara warns when selector locators are integers instead of strings or symbols, often in pagination links and numbered clicks.

Linux: Quickly create large files for testing

Create large placeholder files fast for testing disk usage, storage limits, or performance without writing real data using fallocate.

Using Apache Benchmark (ab) on sites with authentication

Authenticated pages can be benchmarked with ab by supplying the right session cookies; otherwise login-protected requests fail or measure the wrong content.

How to fix gsub on SafeBuffer objects

html_safe strings lose $1 and other match variables inside gsub blocks. A SafeBuffer override can restore access to capture groups during replacements.

Testing webpages globally (as in "around the globe")

Global website checks reveal DNS propagation issues and location-specific rendering problems before users do.

Acceptance testing using Capybara's new RSpec DSL

Capybara now includes an RSpec acceptance-testing DSL, replacing much of Steak’s earlier role and making end-to-end testing in RSpec more seamless.

When does Webpacker compile?

Webpacker compiles assets on demand in Rails, which can freeze helpers and slow page reloads when no dev server is running.

velesin/jasmine-jquery

Jasmine DOM testing is easier with matchers like toBeVisible() and toHaveCss(css), plus fixture loading for temporary HTML setup and cleanup.

Ruby: Comparing a string or regex with another string

Using === with strings and regexes can change matching behavior in Ruby; match? is only safe when the left side is definitely a regex.

Good real world example for form models / presenters in Rails

Rails form-specific model layer for screen logic, separate validations, and callbacks without bloating the base model; useful for different workflows and presentable collections.

thoughtbot/capybara-webkit

Capybara driver for browser testing with QtWebKit when JavaScript support is needed.

How to organize and execute cucumber features (e.g. in subdirectories)

Cucumber feature files can live in subdirectories, but step definitions and support files need an explicit load path. Using -r features keeps subfolder runs working.

esbuild: Make your Rails application show build errors

esbuild watch errors stay hidden in the terminal while Rails keeps serving stale assets; writing them to a file lets the app render build failures in development.

Disabling Spring when debugging

Spring can hide code changes while debugging Rails commands because it reuses a cached application process. Disabling it avoids stale behavior in rails and rake runs.

Web development: Accepting a self-signed certificate in Google Chrome

Chrome can reject locally generated self-signed certificates and hide HTTPS even when they work. Importing the certificate or launching with --ignore-certificate-errors allows testing.

Postgres in Alpine docker container: sorting order might differ

String sort order can change when PostgreSQL runs in an Alpine-based Docker image because locale and collation defaults differ from Debian images.

GitHub Actions: Retrying a failing step

Flaky commands in GitHub Actions can fail intermittently; nick-invision/retry reruns them with a timeout and limited attempts.

git: find the version of a gem that releases a certain commit

Find the gem version that first contains a commit by using git name-rev --tags; it points to the next release tag after the change.

Savon testing: How to expect any message

Savon mocks usually require an exact SOAP request body, but message: :any accepts any payload and returns the stubbed XML.

How to migrate CoffeeScript files from Sprockets to Webpack(er)

Migrating CoffeeScript from Sprockets to Webpacker can keep existing classes and dependencies working by adding coffee-loader and adjusting imports and global namespace exposure.

davetron5000/methadone - GitHub

Ruby framework for building command-line apps with parameter handling, utility classes, and Cucumber support for CLI testing.

Upgrading Cucumber and Capybara to the latest versions available for Rails 2

Rails 2-compatible versions of Cucumber, Capybara, and related gems avoid breakage from newer dependencies and Capybara API changes.

Implementing social media "like" buttons: Everything you never wanted to know

Embedding social widgets can expose cookies, trigger background tracking, and slow pages; privacy-friendly two-step buttons and async loading reduce the impact.