Making httpclient use the operating system's SSL cert store

httpclient can ship with an outdated custom certificate store, causing SSL verification failures. Using the operating system’s default CA paths keeps trust roots current.

Upgrading a Rails app to Cucumber 3

Rails apps upgrading to Cucumber 3 often need gem updates, new tag syntax, and step-definition fixes to avoid parser and argument-mismatch errors.

Delegating an instance method to a class method in Ruby

Expose a class-level answer through instances by delegating an instance method to class with ActiveSupport's delegate.

Legacy docs for Font Awesome 4.7

Font Awesome 4 icon names differ from Font Awesome 5, where each name is valid only together with an icon set name.

VNC browser disappears while typing

Typing d in a Geordi VNC browser can switch to a grey screen; pressing d again brings the browser back.

Firefox: Focus-sensitive Selenium tests do not work reliably in parallel test execution

Firefox suppresses focus and blur events when its window is unfocused, making Selenium tests flaky in parallel execution. ChromeDriver is the recommended workaround.

Nested Spreewald patiently blocks are now patient

Nested patiently blocks now wait independently in Spreewald, preventing detached DOM failures when with_scope reuses cached elements.

PostgreSQL: Upgrading your user to a superuser

Limited PostgreSQL privileges can block database cleanup, dump imports, and storage-path queries; granting the application user superuser rights avoids PG::InsufficientPrivilege.

How to: Fix incorrect MySQL client library version

mysql2 fails to load when the installed MySQL client library version does not match the version used at compile time. Rebuilding the gem with gem pristine mysql2 usually fixes the native extension.

How to: Restart vnc server for geordi

VNC viewer startup can fail with “Connection refused” when the geordi session server on display :17 is hung or still locked. Restarting the server and removing the stale lock file restores access.

Mysql::Error: BLOB/TEXT column can't have a default value

MySQL 5.6 rejects default values on BLOB and TEXT columns, blocking migrations that rely on them. Adjust the migration, move defaults into the application, or temporarily change sql_mode.

How to: Solve gem loaded specs mutex

Ruby 1.8.7 test runs can fail with Gem::LOADED_SPECS_MUTEX NameError under older Bundler; Bundler 1.16.1 resolves it.

List of :status symbols for rendering in Rails

Rails render accepts HTTP status symbols such as :bad_request, making responses more readable than numeric codes.

How to stub class constants in RSpec

RSpec cannot stub constants directly; using attributes, wrapper methods, or test helpers makes constant-dependent code easier to isolate.

How to control Chromedriver using curl

Use curl to drive Chromedriver directly for simple debugging, opening pages, finding elements, and reading text without selenium-webdriver.

Ruby: Removing leading whitespace from HEREDOCs

Ruby 2.3+ supports <<~ for automatic HEREDOC unindentation; older versions can use ActiveSupport's String#strip_heredoc to remove common leading whitespace.

Chrome: Making high-resolution website screenshots without add-ons

High-resolution website screenshots can be captured in Chrome without add-ons, producing PNGs suitable for print and Retina displays.

RSpec expects pending tests to fail

Pending RSpec examples need a failing body; otherwise a passing pending example is treated as a failure. Omit the body, add fail, or skip with xit/xdescribe.

Heads up! Years are always floats in Rails < 4

1.year returns a Float in Rails < 4 and can break code that expects an integer duration; Rails 4 uses ActiveSupport::Duration instead.

Centering with CSS vertically and horizontally (all options overview)

CSS centering is awkward because each method has trade-offs in browser support, sizing, and layout constraints. Two guides help choose the best alignment approach for a given use case.

Think twice before using application names in your variables and methods

Using application or provider names in variable and method names makes code brittle during replacements and extensions; abstract, reusable names reduce renaming and adaptation work.

Katapult 0.4.0 released

Katapult 0.4.0 adds application-model associations and can generate a project README for Rails-style project scaffolding.

Cucumber: How to avoid VCR errors for unused requests in pending tests

Pending Cucumber steps can fail when VCR cassettes contain unused HTTP interactions; @allow_unused_http_interactions can be enabled only for pending features.

Katapult 0.3.0 released

Katapult 0.3.0 adds Rails 5.1.4 and Ruby 2.5.0 support, a new Bootstrap-based design, Webpacker, and workflow and test improvements.