Hack of the day: Find all classes that define a method with a given name

Find every class or module that implements a given instance method by scanning Ruby's object space and checking method ownership.

Boolean fields in migrations

Updating boolean columns in a migration needs database-specific true/false values; quoted_true and quoted_false return the correct representations in Rails.

How to deal with strange errors from WEBrick

WEBrick can emit unreadable URI and request-line errors when a browser connects with HTTPS; switching the URL to http avoids the SSL mismatch.

How to test print stylesheets with Cucumber and Capybara

Print stylesheets often regress as apps evolve, leaving paper output cluttered or unreadable. Cucumber and Capybara can verify visible content, white backgrounds, and hidden controls.

Reset mysql root password

MySQL or MariaDB root access can break after password loss or unix_socket authentication changes on a local workstation. Root credentials can be reset or switched back to password login.

Be careful when using Unicode symbols for graphical elements

Unicode symbols used as graphics can render inconsistently across Linux, Windows, and macOS because browsers fall back to different fonts for missing characters.

Flat Icons & Icon Fonts | CSS-Tricks

Icon font sets provide scalable symbols for interfaces, with Font Awesome as a commonly recommended option.

How to install GNOME classic desktop in ubuntu 12.04

Install the GNOME Classic fallback desktop on Ubuntu 12.04 and switch to it from the login screen.

RSpec and Cucumber: Shorthand syntax to run multiple line numbers in the same file

Run multiple example or scenario line numbers from one file with rspec or cucumber, using colon-separated targets instead of separate commands.

Howto get rid of Rubymine Popup "Install missing gems" when using RVM

RubyMine can prompt to install missing gems when the project Ruby differs from the configured interpreter. Setting the correct Ruby version per project prevents the popup.

Scoping a sunspot solr search by text using a string field

Sunspot filtering cannot use text fields for scoping because they are tokenized; add a string field to match exact values like state names.

Git: When committing, check the diff

Review staged and unstaged changes before committing to avoid leftovers and bad edits; git commit -v adds the diff to the commit message buffer.

Impressumspflicht bei Facebook & Twitter: Schnelle Info und Abhilfe

Für nicht-private Social-Media-Profile ist ein Impressum Pflicht; fehlende oder schlecht auffindbare Angaben schaffen eine Abmahngefahr. Facebook und Twitter brauchen dafür eigene, leicht erreichbare Verlinkungen.

How to inspect controller filter chains in specs

Inspecting callback chains in controller specs helps verify before- and after-action behavior, especially when tests need to confirm filter order or presence.

ActiveRecord::SpawnMethods

ActiveRecord::SpawnMethods removes query parts from an existing scope chain, helping build cleaner variations without rewriting the whole relation.

SSL certificate problem, when trying to install the libyaml package

RVM certificate expiry can block libyaml installation with SSL verification errors; updating certificates with rvm get stable restores curl access and lets Ruby be rebuilt.

How to fix: Firefox uses incorrect fonts on all webpages, regardless of their CSS

Firefox may ignore your chosen fonts and render webpages with fixed fonts when page-defined font selection is disabled.

Rspec shared example group error: ensure_shared_example_group_name_not_taken

Rspec shared example groups can collide with spec file names like *_spec.rb, causing ensure_shared_example_group_name_not_taken when RSpec loads them as specs.

Understanding the Selenium error "Modal Dialog Present" (aka Selenium::WebDriver::Error::UnhandledAlertError)

Intermittent Cucumber failures can come from a leftover browser alert blocking Selenium commands after an unfinished AJAX request.

Rails, callbacks, workers, and the race you never expected to lose « Logical Friday

Delayed background jobs can run before a Rails record is committed, causing after_save logic to see unsaved state and fail unexpectedly.

How to Create CSS3 Ribbons Without Images - SitePoint

Pure CSS3 ribbon effects without image assets, using shapes and styling instead of graphics for decorative labels and banners.

MySQL: Can I speed up LIKE queries by adding an index?

MySQL can use an index for LIKE patterns with a fixed prefix, but leading wildcards still force a scan. Ancestry-based hierarchy scopes may need indexing; PostgreSQL can use trigram indexes for broader matching.

RubyMine: Accessing views and partials from controllers

RubyMine links controller methods to their views and partials through gutter icons, making navigation between Rails controllers and templates faster.

Mock the browser time or time zone in Selenium features

Selenium browser tests see real system time unless the client clock is patched; timemachine.js and Timecop keep browser time aligned, while TZ can align the process time zone.