Raise when there's a I18n translation missing
translate! and t! raise I18n::MissingTranslationData on missing translations instead of returning placeholder text. A custom exception handler can make I18n raise globally.
Performance analysis of MySQL's FULLTEXT indexes and LIKE queries for full text search
MySQL text search performance differs sharply between LIKE and FULLTEXT; LIKE stays surprisingly fast on medium datasets, while FULLTEXT benefits from larger vocabularies.
GitHub Actions: Manually running a workflow
Manual workflow runs in GitHub Actions require workflow_dispatch; eligible workflows then appear in the Actions tab with a Run Workflow button.
Web Operations 101 For Developers
Web application developers increasingly need operational knowledge beyond coding, testing, and deploying. Traditional development workflows now overlap with running and maintaining production systems.
Project management best practices: User stories & Issues
Clear, well-scoped issues reduce misunderstandings and rework in Linear. User stories, acceptance criteria, backlog priority, and rough estimates keep work actionable.
Running Cucumber deletes my whole app!
Capybara Screenshot can delete the application directory during a Cucumber run when screenshots are stored in .. Upgrading to 1.0.26 and setting Capybara.save_path avoids the destructive cleanup.
Unpoly: Testing values for presence or blankness
Blank and missing values in JavaScript need explicit handling; Unpoly provides up.util.isBlank(), up.util.isPresent(), up.util.isMissing() and up.util.isGiven() for common and custom types.
Copy to clipboard without flash (clipboard.js)
Flash-free copy-to-clipboard handling with clipboard.js, including success and error callbacks, text selection feedback, and support for text fields or data attributes.
How to check if a file is a human readable text file
Ruby's File.binary? is only a fast guess and can misclassify PDFs or UTF-8 text. A safer check validates the file contents against the target encoding.
ActiveRecord::Store: migrate data in store
Migrate hashed settings stored in a single column by renaming keys safely in an ActiveRecord::Migration, using the store's coder and an embedded model.
responsive.is
Online tool for checking how a site renders across common desktop, tablet and phone screen sizes.
Using Thin for development (with SSL)
Local SSL development with Thin avoids mixed-content and redirect issues while testing force_ssl on localhost using a self-signed certificate and separate HTTP and HTTPS ports.
Freeze (vendor, unpack) a single Ruby gem with and without Bundler
Vendoring a patched Ruby gem in Rails can fail without gem metadata, especially with Bundler. A proper .specification file and :path setup make the local copy usable.
Rails logs are not flushed automatically (in Rake tasks)
Production Rake tasks can lose Rails log output because the logger buffers lines and does not flush on exit. Rails.logger.flush or a task wrapper writes pending entries to disk.
How to mount a legacy database to migrate data
Legacy data can be imported into a new Rails app by connecting a second database and mapping old tables and columns with Active Record models.
httpbin: HTTP Client Testing Service
Generic endpoints for testing HTTP clients with slow connections, redirects, and compressed responses, useful when debugging timeout issues.
How to inspect RSS feeds with Spreewald, XPath, and Selenium
RSS feeds in Capybara can fail as XML inside the browser DOM; inspecting page source, using XPath, and opening the feed URL directly avoids false results.
How to grep through the DOM using the Capybara API
Capybara can search page HTML in Ruby when CSS or XPath is awkward, but DOM changes can cause stale element errors.
Online tool to convert tables between different formats
Online table conversion helps move data between JSON, Markdown and CSV, with transpose support for rotated tables. Not suitable for sensitive data.
Traversing the DOM tree with jQuery
jQuery traversal methods move a selection through the DOM tree to find descendants, ancestors, parents, children, or matching elements efficiently.
Rails: Reverse Lookup a Fixture Name by it's id and table name
Find a Rails fixture name from a table and numeric id when the record label is unknown. ActiveRecord::FixtureSet can search loaded fixtures and return the matching key.
Speed up JSON generation with oj
Use oj to generate JSON much faster for large Ruby hashes, but account for symbol handling, Rails compatibility, and HTML escaping to avoid XSS.
Cucumber.yml was found, but could not be parsed.
cucumber fails because cucumber.yml cannot be parsed; removing rerun.txt in the Rails directory often fixes the invalid rerun state.
Error "undefined method last_comment"
RSpec loaded by Rake can fail with NoMethodError: undefined method 'last_comment' when Rake 11 removes a method required by older rspec-core.