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.
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.
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.
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.
Resources for working with the Youtube API
Working with the YouTube Data API requires API keys and quota awareness; request costs vary by query type, so testing requests and understanding the domain model helps.
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.
How to fix: Microphone recording levels are too quiet (or get lowered automatically)
Low microphone input makes calls hard to hear, and Skype can silently reduce recording gain. Adjusting the input level and disabling automatic mixer changes keeps speech audible.
Capybara 'fill_in': Ambiguous match for different input names
Capybara fill_in can raise Capybara::Ambiguous when visible field labels overlap. match: :prefer_exact or a global exact matching strategy avoids substring conflicts.
During deployment: "You are trying to install in deployment mode after changing your Gemfile"
Deployment can fail with a misleading Gemfile error when the server uses a newer Bundler than the version recorded in Gemfile.lock. Matching Bundler major versions on both sides prevents the install mismatch.
About the HTML and the BODY tag
html and body behave differently from normal elements, making them poor choices for layout, sizing, and positioning; use them mainly for global defaults.
RubyMine crashes Ubuntu 11.04 window decorator on exit
Java GUI apps can crash Ubuntu 11.04’s window decorator on exit, leaving missing title bars and requiring a temporary restart of the decorator.
Accessing Rails config in webpack(er)
Rails secrets and other configuration values can be read inside webpack bundles with rails-erb-loader, enabling environment-specific client-side settings without hardcoding them.
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.
How to open a new tab with Selenium
Browser popup blocking prevents window.open from Selenium; injecting a clickable temporary link opens a new tab reliably in Chrome.
Fix "subprocess installed post-removal script returned error exit status ..." when installing/removing/updating a package with apt
APT package operations can fail when maintainer scripts return exit status 78, often because postinst, postrm, or prerm scripts hit leftover files or mounted directories.