Case Study: Analyzing Web Font Performance
Web font loading can delay first paint and cause FOIT, especially on slow connections. Delivery choices, fallback handling, and reduced font variants improve perceived performance.
RSpec: Tagging examples and example groups
Tagging RSpec examples and groups lets you filter slow or special cases, assign values, and trigger hooks or module includes by metadata.
RSpec matcher to compare two HTML fragments
Compare two HTML snippets in RSpec while ignoring whitespace, comment nodes, quote style, and attribute order.
Managing Rails locale files with i18n-tasks
i18n-tasks helps keep Rails locale files complete by finding missing and unused translation keys and reducing manual YAML bookkeeping.
List of Chromium Command Line Switches « Peter Beverloo
Extensive Chrome startup options help build custom browser drivers and automate testing with Capybara.
RestClient / Net::HTTP: How to communicate with self-signed or misconfigured HTTPS endpoints
HTTPS requests fail against self-signed certificates or broken certificate chains unless the correct CA, intermediate cert, or certificate store is configured.
Capistrano 3: Running a command on all servers
Capistrano 3 can execute an arbitrary shell command across all app servers, useful for grepping logs or bulk remote checks.
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.
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.
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.
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.
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.
velesin/jasmine-jquery
Jasmine DOM testing is easier with matchers like toBeVisible() and toHaveCss(css), plus fixture loading for temporary HTML setup and cleanup.
Testing webpages globally (as in "around the globe")
Global website checks reveal DNS propagation issues and location-specific rendering problems before users do.
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.
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.
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.
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.
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.
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.
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.
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.