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.
Ollama: Strip image data from VCR recorded requests
VCR cassettes can bloat with base64-encoded vision payloads and leaked Basic Auth credentials; sanitizing request bodies and custom matching keep recordings small and playback reliable.
Testing for XSS in Markdown Fields
Markdown fields can become XSS sinks when user input is rendered unsafely, allowing javascript: links, image event handlers, and filter bypasses.
Consul 0.9 lets you optimize records checks
Record-level permission checks can be optimized by replacing scope lookups with a direct predicate, avoiding database ID scans for large collections.
Action Mailer Previews
Previewing Rails emails in the browser catches layout and content issues before delivery and helps keep mailer output aligned with expectations.
Browsers will not send a referrer when linking from HTTPS to HTTP
Secure pages linking to insecure destinations suppress the Referer header, making visits appear as direct traffic and breaking source tracking.
Chrome Lighthouse
Built-in Chrome auditing checks performance, accessibility, and other quality signals for web apps, including private or local pages. Development settings can skew results; Webpagetest is an alternative.
Mixed Content Examples
Mixed content behavior differs when secure pages load assets over HTTPS versus HTTP, exposing browser handling of blocked or downgraded resources.
How to set up SMTP email delivery with a Gmail account
Rails applications can send mail through Gmail’s SMTP server with smtp_settings; Google app passwords enable delivery when two-factor authentication is enabled.
Rspec: around(:all) and around(:each) hook execution order
RSpec hook order matters when around(:all) and around(:each) wrap setup and teardown; their execution timing differs from before and after hooks.
Cucumber may complain about cucumber.yml being invalid when it is valid
Cucumber can report cucumber.yml as invalid even when it parses correctly; an invalid rerun file like tmp/rerun.txt may trigger the error.
Ruby: A short summary of available hooks in Cucumber
Cucumber Ruby offers scenario-level, step-level, and global lifecycle hooks, plus tag filtering and World modules for reusable helper methods.
Inspecting the page content in Capybara
Debugging Capybara page output often requires inspecting visible text, raw HTML, or parsing page.body with Nokogiri when matcher failures are hard to interpret.
BrowserStack has browser plugins for local testing
Private and internal servers can be tested through the BrowserStack cloud without exposing them publicly, even behind firewalls, proxies, or Active Directory.
How to fix: Bundler 1.13 breaks parallel_tests
Upgrading to Bundler 1.13.x can break parallel_tests with a LoadError when loading Gherkin formatters. Setting bundle config --local disable_exec_load true restores the old behavior.
Fix a spec that only runs when called directly
RSpec examples that run only when invoked directly often need a proper _spec.rb filename; a plain .rb file may be skipped in the full suite.
Quick HTML testing with RubyMine
Quickly preview embed code or other HTML in RubyMine without creating a project file by using an HTML scratch file and opening it in a browser.
RSpec: Increase readability with super_diff
Hard-to-read RSpec diffs for nested hashes and collections can be improved with super_diff, which formats expectation mismatches more clearly.
Output of ParallelTests::Cucumber::FailuresLogger was fixed in 4.9.1
ParallelTests::Cucumber::FailuresLogger now emits valid rerun arguments in version 4.9.1, so patched custom loggers can be removed and the default logger restored.
How to install packages from newer Ubuntu releases
Install newer Ubuntu release packages on an LTS system when new hardware or software needs them, while minimizing dependency conflicts and upgrade risk.
Cucumber features as documentation
Natural-language Cucumber features and scenarios can capture intent and context beyond one-line labels, helping future developers understand application behavior quickly.
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.
RCov: The difference between "code coverage" and "total coverage"
Code coverage can look misleading when blank lines and comments count against the ratio; RCov total coverage ignores them for a more useful metric.
SSHKit 1.9.0 failure for Capistrano deploy
Capistrano deploys can crash in sshkit-1.9.0 with NoMethodError in pretty.rb; upgrading SSHKit to 1.21.0 resolves the failure.