Upgrade guide for moving a Rails app from Webpack 3 to Webpack 4

Webpacker 4 and Babel 7 change config files, package names, asset paths, and polyfill imports when upgrading a Rails app from Webpack 3.

Rails: How to get URL params without routing parameters (or vice versa)

Rails merges query string, request body, and routing data in params; request.query_parameters and request.path_parameters separate URL values from route data.

Micro clearfix mixin for Sass

A float-clearing Sass mixin can avoid extra markup while preserving margin collapse and visible overflow. display: block is a safer clearfix choice than display: table or overflow: hidden.

Copy to clipboard without flash (clipboard.js)

Flash-free copy-to-clipboard handling with clipboard.js, including success and error callbacks, text selection feedback, and support for text fields or data attributes.

JavaScript without jQuery

Moving away from jQuery improves performance, reduces bundle size, and aligns with the modern web platform. Native DOM APIs and polyfills now cover most common needs.

How to install bundler for Ruby < 2.3

Bundler 2 needs Ruby 2.3.0+ and RubyGems 2.5.0+; older Ruby versions require installing the last Bundler 1 release with gem install bundler -v '~>1'.

AngularJS 1: How to keep "ng-hidden" elements from flickering on page load

AngularJS elements can flash visible before bindings apply. ng-cloak hides content until Angular loads; preadding ng-hide also prevents flicker but relies on internals.

Carrierwave: Built-in resize methods

Built-in CarrierWave image resizing helpers preserve aspect ratio, crop, or pad images to target dimensions, with MiniMagick and RMagick offering the same methods.

Trigram indexing as an alternative to PostgreSQL fulltext search

PostgreSQL fulltext search misses partial matches in dates, serial numbers, and other token fragments. Trigram indexes speed up wildcard LIKE searches on large tables.

How to drop all tables in PostgreSQL

Removing every table while keeping the PostgreSQL database can be done by dropping the schema or iterating through tables with DROP TABLE statements.

RubyGems can't find bundle executable although Bundler is installed

bundle install fails with Gem::GemNotFoundException when Bundler 2 runs on RubyGems 2; updating RubyGems to 3.0+ restores the bundle executable.

How to overwrite and reset constants within Cucumber features

Cucumber feature tests can temporarily replace global constants and restore them after each scenario, including newly created constants, without warning noise.

Upgrading Ruby from 1.8.7 to 2.3.5

Ruby 2.3.5 migration from 1.8.7 needs gem updates, syntax fixes, and test adjustments to resolve compatibility errors across Rails apps.

Rails index route for resources named after uncountable substantives

Uncountable Rails resources break normal route helpers and form handling. resource can still expose the index action through a special _index_path helper.

How to create a Basic Auth header value

Basic Auth sends credentials as a Base64-encoded username:password string in the Authorization header; Ruby can generate it with Base64.strict_encode64.

Ruby: Reading and writing CSVs

Ruby can read and write CSV files with the standard CSV library, and smarter_csv makes imports more convenient when converting rows into hashes.

CSS: How to find out the rendered font in chrome

System-specific font fallbacks can make text look different across machines; Chrome DevTools can reveal the actual rendered font in the Computed panel.

Live CSS / view reloading

Automatic browser refresh for stylesheet and view changes reduces manual reloads during front-end work and keeps page updates visible immediately.

Puma: How to force a single threaded boot in development

Single-threaded Puma in development avoids overlapping requests and noisy console output when debugging. Setting -t 0:1 makes other requests wait.

Cucumber: How to find unused step definitions

Cucumber can list step definitions separately, helping detect dead or duplicate steps before cleanup. --dry-run and --format stepdefs reveal candidates, but nested step calls can look unused.

Machinist blueprints: Do not set associations without blocks

Association values in Machinist blueprints need blocks so Project.make runs per blueprint instance, not once at parse time when RSpec loads.

How to upgrade Rails: Workflow advice

Upgrading Rails across major versions needs staged updates, compatible Ruby and gem versions, and repeated checks in console, server, tests, and config defaults.

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.

byebug / ruby-debug: Find out current debugger position

l= shows the current file and line in byebug or ruby-debug; where and backtrace print the debugger call stack.