Caching may break relative paths in your merged stylesheet
Stylesheet caching can merge files from different folders and leave relative image paths pointing to the wrong location, so images work locally but fail on the server.
Scenario outlines in Cucumber
Template-based examples reduce repetition in behavior-driven tests and make repetitive cases easier to maintain.
ERB templates and comments
Whitespace before # in ERB Ruby comments can produce unexpected HTML output; <%# ... %> and newline-indented comments avoid the problem.
Git instaweb
Git includes a built-in browser-based repository viewer for local inspection; git instaweb starts a temporary web server, with Apache or lighttpd support.
Graticule computes NULL distance for some records (and how to fix that)
Spherical distance queries in Graticule can return NULL because MySQL rounding pushes ACOS outside its valid range. Clamping the value to [-1, 1] prevents the zero-distance edge case.
Sequel: The Database Toolkit for Ruby
A lightweight database toolkit for Ruby bridges the gap between ActiveRecord and raw SQL when full ORM features are unnecessary.
DataMapper Retrospective
Two major projects started with DataMapper and later moved to a different ORM, raising questions about the framework’s long-term fit and maintainability.
Bulk-change multiple table rows in a migration
Multiple column changes in a migration can trigger repeated SQL and slow large tables; change_table can bundle them into one ALTER TABLE statement.
Rails ERD – Entity-Relationship Diagrams for Rails
Generate visual database relationship maps from Rails ActiveRecord models for easier schema understanding and documentation.
Ubuntu 11.10: Playing sound over front and back panel (or headphones and speakers) at once
Front and back audio outputs can stop playing together when jack sensing or auto mute disables one panel. alsamixer can turn off the behavior.
ActsAsTaggableOn: Cache tag lists
Cached tag lists in ActsAsTaggableOn reduce eager loading and improve performance by storing tag data directly in the model.
How to ignore new files or changed files in git
Untracked or modified files clutter Git status and can be hidden locally or for everyone with ignore rules and git update-index flags.
How to define a custom context menu within HTML (Firefox 8+)
Custom right-click menus can be built with HTML in Firefox 8+ instead of relying on browser defaults.
Configuration for Rails, the Right Way
Rails 3 lets applications define custom configuration elements directly, avoiding extra gems or plugins for miscellaneous settings.
Create a new gemset with RVM
Separate gemsets let each Ruby application use its own installed gems. rvm use 1.8.7-p323@makandra_project_xy --create creates and switches to a new gemset.
Error "execution expired (Timeout::Error)" when using Selenium and Webmock
Bulk test runs can fail with execution expired (Timeout::Error) when Selenium and WebMock interact; upgrading WebMock to 1.7+ resolves the timeout issue.
Excel files can't hold more than 65535 rows per worksheet
Classic XLS worksheets stop at 65,535 rows; the Spreadsheet gem writes only XLS, so larger exports need split sheets, extra columns, or XLSX output.
Find geocoded records that are close to a location (radius search)
Find records near a latitude/longitude pair by calculating distances in SQL or using acts_as_geocodable for radius-based queries.
"Require group" doesn't work with Ubuntu's default Apache installation
Require group in Ubuntu’s default Apache setup fails silently without the group authentication module. Installing libapache2-mod-auth-sys-group enables group-based access control.
Run a script on the server
Set the Rails environment explicitly when running server-side scripts to avoid using the wrong database or configuration. Rails 2 uses script/runner; Rails 3 uses rails runner.
Declare different CSS background-images for different locales
Language-specific styling can switch background images per locale by using the HTML lang attribute in views and matching selectors in stylesheets.
How to manage Thunderbird mailing lists
Thunderbird mailing lists group contacts for easier recipient selection and broadcast email to every member from one address-book entry.
Preparing your test database: mind the differences
Test database setup can drift from development when schema dumps omit SQL-specific details; choose the right Rake task to keep structure, charset, and collation aligned.
See with tig which git commits touch a file or files or folders
tig can filter commits by path, helping find which changes touched a file, folder, or wildcard pattern without scanning every revision.