ActiveRecord::StatementInvalid: Mysql2::Error: closed MySQL connection

MySQL query timeouts can leave Rails with a closed connection and failing queries. Automatic or manual reconnect restores access, but rolls back transactions and releases locks.

How to change the locale of a PostgreSQL cluster

Changing a PostgreSQL cluster locale requires dropping and recreating the cluster, which erases data and roles unless they are backed up and restored.

xfce - How do I finetune subpixel font anti-aliasing?

XFCE text can look too sharp and thin when subpixel anti-aliasing is filtered poorly. Disabling the LCD filter often restores smoother font rendering.

The Future of AngularJS

Upcoming AngularJS changes promise a more capable framework with improvements aimed at modern web app development.

PostgreSQL cheat sheet for MySQL lamers

Quick reference for users moving from MySQL to PostgreSQL, with command equivalents for databases, tables, users, privileges, and psql shortcuts.

Open browser console with keyboard shortcut

Keyboard shortcuts open the browser developer console quickly in Chrome and Firefox, saving time when inspecting errors and debugging web pages.

mysql2 and older ruby versions

mysql2 0.3.13 can fail to compile on older Ruby 1.9.3 patch releases in rvm, causing an undefined symbol error; pinning 0.3.11 avoids the issue.

Disable text-transforms in Selenium tests

text-transform: uppercase can make Selenium assertions flaky and break umlaut handling; disabling transforms in tests improves reliable label text matching.

List of Compass Mixins

Migrating from homegrown Sass helpers to Compass often requires mapping old mixins to the framework's built-in alternatives.

Responsive Elements - Helps you build better responsive websites

Element-level responsiveness lets content adapt to its container instead of the screen, reducing layout breakpoints and making components easier to reuse.

dusen and edge_rider gems no longer depend on Rails

dusen 0.4.8 and edge_rider 0.2.3 no longer require Rails, while still depending on ActiveRecord, making them usable with Sinatra and other non-Rails apps.

Building Custom Text Strikethroughs with CSS

Text decorations in CSS can be customized beyond the default strike-through or underline, including color and wavy styles.

Normalising Designs For Better Quality CSS

Looser design requirements can keep CSS simpler and higher quality by reducing unnecessary complexity and brittle styling workarounds.

Concerned about Concerns?

Rails Concerns help break up oversized Active Record models, but their trade-offs and community debate make them a contested choice.

What are the best programming fonts?

Fonts for coding affect readability, eye strain, and character clarity. A well-chosen monospaced typeface can make long sessions easier to read.

4 Lessons Learned Doing Angular on Rails

Experience from building an Angular frontend with a Rails backend, highlighting practical lessons for teams combining a JavaScript client with server-side Ruby on Rails.

.rvmrc deprecated in favor of .ruby-version and .ruby-gemset

.rvmrc is obsolete for Ruby version and gemset setup; .ruby-version and .ruby-gemset work with other version managers and avoid patch-level clutter.

redshift

Night-time screen glare can strain the eyes; redshift adjusts monitor color temperature to match location and local time.

"cannot load such file -- nokogiri/nokogiri" (or any other Gem with native extensions on rvm and Ruby >= 2)

Native extensions can be installed into broken paths on RVM with Ruby 2, causing cannot load such file -- nokogiri/nokogiri after gem install or Bundler.

Outlook deletes iCalendar ICS eMails and moves them to trash folder

Outlook can auto-delete ICS emails and mark calendar items tentative when the event organizer matches the recipient. Using a different organizer address avoids the deletion.

Capybara: Trigger requests with custom request method

Capybara request helpers can send non-GET actions for destructive tests, letting RackTest and Selenium submit DELETE requests instead of only visiting pages.

Use bundle open to open a gem's code in your $EDITOR

Open a bundled gem’s source directly in your editor instead of hunting through installed files; bundle open launches the gem code from Bundler.

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.