Using local fonts with Webpack / Webpacker

Using self-hosted or purchased fonts with Webpack or Webpacker requires either bundling them from assets or packaging them locally for clean imports.

MySQL: For each group, retrieve a comma-separated list of values in a given column

GROUP_CONCAT aggregates values per group into a comma-separated string, but truncation at group_concat_max_len can silently corrupt results unless the limit is raised.

How Exchange handles multipart/alternative emails

Exchange can discard the plaintext part of multipart/alternative email, leaving only HTML in normal mail accounts and complicating debugging.

Mysql/Mysql2 agnostic database.yml

Upgrading to the mysql2 gem can require a deploy-time database.yml change; one adapter line can keep the same config working with both MySQL libraries.

Bundler: Gemfile.lock is corrupt & gems are missing from the DEPENDENCIES section

Older Bundler versions can reject legacy Gemfile.lock files as corrupt when dependency metadata changes; adding missing gems or downgrading Bundler restores installs.

Capistrano 2: Which Capistrano hooks to use for events to happen on both "cap deploy" and "cap deploy:migrations"

Capistrano 2 hooks must target deploy:update_code, deploy:symlink, and deploy:restart to run tasks for both cap deploy and cap deploy:migrations.

Unicorn: How to force a single threaded boot in development

Limit Unicorn to one worker in development to keep debugging output manageable and prevent concurrent requests like ActionCable from flooding the console.

Manually uploading files via AJAX

Binary file uploads need FormData so AJAX can send multipart payloads from file inputs without manual serialization; older browsers often need a plain form fallback.

Putting static content on Cloudfront

Static assets on CloudFront can speed up page loads, but cache invalidation, gzip handling, SSL, fonts, and mixed-content rules need careful handling.

How to: Use Ace editor in a Webpack project

Ace editor adds syntax highlighting and auto-indenting for in-browser code editing, with a working brace setup for Ruby on Rails Webpacker and Webpack 2.

MySQL 5.7.5 enables `ONLY_FULL_GROUP_BY` mode per default

ONLY_FULL_GROUP_BY in MySQL 5.7 rejects queries that select non-grouped columns, preventing nondeterministic results and breaking some Rails scopes.

Virtual attributes for array fields

Store associated values as a single array-like field, editable in forms and restored safely after validation errors, while syncing to the underlying relation.

Sharing cookies across subdomains with Rails 3

Cross-subdomain session cookies in Rails 3 need a shared cookie domain; local development can fail with CSRF token errors when browsers reject the cookie.

How to fix Passenger "Unexpected end-of-file detected" error

Passenger can fail with a misleading EOF error when the app spawner exits unexpectedly, often because a gem is missing. bundle install usually resolves it.

Yarn: How to recognize that you are using a different node version than your colleagues

Mismatched Node.js versions can trigger Yarn integrity errors and unexpected node_modules changes, especially when dependencies are committed or .nvmrc is missing.

Spreewald: Content-Disposition not set when testing a download's filename

Public file downloads may miss Content-Disposition, so filename checks fail in Spreewald. Matching only Content-Type or testing the downloaded file avoids flaky download assertions.

Drag'n'drop in trees: I went to town

Nested drag-and-drop for reorderable trees is hard when items can be leaves or containers; precise drop targets need custom JavaScript, CSS, and testing support.

MySQL shell: Vertical vs horizontal layout

\G in the MySQL shell switches query output to a vertical format, which is easier to read for wide rows or long text fields.

Distribute files from a private bucket on AWS S3

Private S3 files can be streamed with time-limited URLs instead of exposing a reusable bucket link. expiring_url and query string authentication help prevent easy redistribution.

RSpec: automatic creation of VCR cassettes

RSpec examples tagged :vcr automatically record and replay HTTP cassettes, while untagged specs block network calls unless HTTP access is explicitly enabled.

Rails: How to get the ordered list of used middlewares

rake middleware reveals the ordered Rails request stack, useful for adding, removing, or profiling middleware that runs on every request.

Savon testing: How to expect any message

Savon mocks usually require an exact SOAP request body, but message: :any accepts any payload and returns the stubbed XML.

Fix Rubygems binary error: undefined method `activate_bin_path' for Gem:Module (NoMethodError)

Rubygems version mismatches can break generated executables with undefined method activate_bin_path after downgrades. Reinstalling gem executables with gem pristine --all or reinstalling RubyGems and Bundler restores working binstubs.

Share your Internet connection under Ubuntu

Turn an Ubuntu PC into a simple internet gateway for another computer using a second network interface and connection sharing.