cucumber_factory: How to keep using Cucumber 2 Transforms in Cucumber 3
Cucumber 3 replaces legacy Transforms with ParameterTypes, but gem-defined steps and implicit argument conversion can still require backported behavior.
Bundler: How to install version 1 instead of 2 (latest version)
Installing Bundler 1 instead of Bundler 2 is needed for older Ruby versions, especially Ruby < 2.3, and gem install bundler -v '~>1' fetches the latest 1.x release.
Selenium may break with ChromeDriver 75+
ChromeDriver 75+ can trigger W3C errors in Selenium tests, and browser log access may fail. Disabling w3c in Chrome options restores the older behavior.
How to recognize CVE-2019-5418
Path traversal probes in Rails request parameters can indicate attempts to exploit CVE-2019-5418. Fixed releases block the vulnerability.
Execution of shell code in Ruby scripts
Deprecated Ruby ways to run shell commands can be unsafe or behave differently; capture3 is the preferred option for new code.
How to install npm packages globally without sudo on Linux
Install Node global packages in a user-owned directory so npm install -g works without sudo and added executables are available on your PATH.
Rails Asset Pipeline: Building an Icon Font from SVG Files
Asset pipeline setups can still build an icon font from SVG files, but the workflow needs manual generation and stylesheet integration.
Migrating from CoffeeScript to ES6
Moving from CoffeeScript to ES6 is straightforward with decaffeinate, which converts .coffee files to modern JavaScript and may need manual cleanup afterward.
Fun with Ruby: Returning in blocks "overwrites" outside return values
return inside a block can replace a method’s own result and skip later code, which can break Rails helpers like capture and lose html_safe? information.
Better compression for /boot partition
A too-small /boot partition can block updates; switching initramfs compression to xz may shrink boot images without resizing the partition.
Use "overflow: hidden" to avoid floating elements from wrapping a container's text
A floated sidebar can make surrounding text wrap underneath it; overflow: hidden creates a new block formatting context that keeps the content from flowing around the float.
Function Composition in Ruby
Ruby 2.6 adds Proc and Method composition, making functional-style chaining possible in Ruby code.
Webpacker: Side effects of using window.* within the ProvidePlugin
Using window.jQuery in ProvidePlugin can leave jQuery undefined in the browser while $ still works; assigning through global avoids the conflict.
PostgreSQL vs MySQL: How to UPDATE using a JOIN
Updating rows from a related table is needed when backfilling cached data. PostgreSQL and MySQL use different UPDATE join syntax for copying associated values.
How to test Autoprefixer and CSSnext in PostCSS
PostCSS plugin output can be verified by compiling assets and checking Autoprefixer and CSS feature transforms from postcss-preset-env.
Speed up your websites: Put JavaScripts at bottom
Placing JavaScript at the end of the page lets content render sooner in non-client-side apps, reducing perceived load time while keeping scripts centralized.
HTML emails with inline stylesheets and webpacker
HTML emails often break when mail clients ignore external stylesheets. premailer-rails inlines CSS for Rails mailers, and inline image attachments improve compatibility.
Migration from the Asset Pipeline to Webpacker
Moving a Rails app from the Asset Pipeline to Webpacker requires inventorying bundled libraries, repackaging legacy assets, and adjusting deployment for pack-based assets.
MySQL: How to create columns like "bigint" or "longtext" in Rails migrations, and what :limit means for column migrations
Rails migration column sizes depend on type: :limit controls bytes or characters, and certain values map to MySQL tinyint, smallint, mediumint, bigint, text, mediumtext, or longtext.
Github Cheat Sheet
Hidden and lesser-known Git and GitHub features can speed up everyday workflows and reduce friction for version control and collaboration.
During deployment: "You are trying to install in deployment mode after changing your Gemfile"
Deployment can fail with a misleading Gemfile error when the server uses a newer Bundler than the version recorded in Gemfile.lock. Matching Bundler major versions on both sides prevents the install mismatch.
How to doubleclick in Selenium
Capybara tasks can be double-clicked by using Selenium-backed double_click on the matched element; plain Capybara alone does not handle double-clicks.
Why you can't use timezone codes like "PST" or "BST" for Time objects
Timezone abbreviations are ambiguous and often unsupported in Rails time handling; ActiveSupport zone names and offsets avoid wrong parsing, DST mistakes, and misleading displays.
Git: Revert one or more commits
Reverting creates a new commit that undoes earlier changes, useful for backing out a single change or several related commits without rewriting history.