#​650 — April 20, 2023

Read on the Web

Together with  Makandra

Ruby Weekly

Component Driven Development on Rails with Phlex — You’ve likely heard of Phlex, a pure-Ruby approach for building views for a web app (in contrast to ERB’s text/HTML based approach). Brad dives into why (and when) components work well as an option, with many examples providing exposure to the pros and cons.

Brad Gessler (Fly․io)

Adventures in Garbage Collection: Improving GC Performance in Shopify's Monolith — Optimizing GC latency and making performance tweaks can have particularly outsized gains on larger apps, and Shopify's is about as large as it gets (in the Ruby world). Jean walks through the trial-and-error process Shopify undertook to realize their significant improvements.

Jean Boussier (Shopify)

Long Term Support for Ruby on Rails — With Rails LTS you get extended support for old versions of Ruby on Rails. Drop-in gem replacements are available for Rails 5.2, Rails 4.2, Rails 3.2 and Rails 2.3. You can even run your old Rails app with modern Ruby versions.

RailsLTS by makandra sponsor

Sidekiq's Mike Perham on the Journey from Employment to Independence — The Sidekiq background job system is one of the best known tools in the modern Ruby ecosystem. Here, its creator Mike Perham shares the circumstances that led to Sidekiq and Sidekiq Pro, with some advice for those wanting to commercialize their own creations.

Code Code Ship


📕 Tutorials, Articles, and Videos

My Introduction to Superglue: React ❤️ RailsSuperglue is a React Redux starter/library inspired by Turbolinks that's designed to complement the 'classic' Rails paradigms.

Dave Iverson (thoughtbot)

How Upgrading Ruby Broke JavaScript — Be aware of the assumptions you’re making, both implicitly and explicitly, when a strange error surfaces. Chances are, you’re overlooking something: “Sometimes, a bug is the culmination of a lengthy chain reaction of falling dominoes. We have to go back and find what caused the initial topple.” Also a reminder that a quick ‘minor version upgrade’ at 5pm isn’t necessarily the best idea.

Matheus Richard (thoughtbot)

RailsConf Workshop 🚀 Upgrading Rails: The Dual-Boot Way — FastRuby.io is conducting their popular, hands-on Rails upgrade workshop at RailsConf on Mon Apr 24th. Don’t miss it.

FastRuby.io | Ruby and Rails Upgrade sponsor

How to Load Code in Ruby — It’s obvious: require? There are a couple of other ways it can be done worth considering..

Gernot Gradwohl

Memoization with .tap? — There are a few different ways to memoize complicated chunks of code in Ruby. tap provides an option I certainly hadn’t considered before – though at first glance I'm not sure I'm keen.

Alex MacArthur

▶  Uploading Cover Images in Rails with ActiveStorage — A 28-minute screencast covering the essentials of accepting uploads to a Rails app.

Chris Oliver

Adding Auth to a Sinatra-Based API using Auth0
Carla Urrea Stabile (Auth0)

Why Tests Flake More on CI Than Locally
Jason Swett

🛠 Code & Tools

Faker 3.2: A Library for Generating Fake Data — The popular dummy data generator continues to improve. v3.2.0 changes the behavior of email and domain name generation to be RFC 2606 compliant. The safe_email and free_email methods have been deprecated and will be removed from October.


Regexp::Parser 2.8: A Regular Expression Parser Library — Tokenize, parse and transform regular expressions right from Ruby. There’s a lot on offer here, and it’s used by projects like Capybara, Rubocop, and JsRegex which converts Ruby regexes to JavaScript-ready ones.

Ammar Ali

So There I Was, Using Your App, When Suddenly…🤯 — Let users tell you what happened in their own words when encountering an error. See how it works.

Honeybadger sponsor

ruby_whatsapp_sdk: Communicate with WhatsApp's API — Send text, messages, stickers, etc. in WhatsApp which offers 1000 free conversations per month via their Cloud API.

Ignacio Chiazzo Cardarello

Rack Canonical Host: Middleware for Defining a Canonical Host Name — Define a single host name as the canonical host for your application. Requests for other host names will then be redirected to the canonical host.

Tyler Hunt


API Integration Expert Wanted: Join Uplisting's Remote Team as an Integrations Engineer — We’re seeking a talented Ruby dev with strong API integration experience to join our remote team and bring innovation to our vacation rental management service.

Find Ruby Jobs with Hired — Hired makes job hunting easy-instead of chasing recruiters, companies approach you with salary details up front. Create a free profile now.