#​688 — February 1, 2024

Read on the Web

Together with  reinteractive

Ruby Weekly

Ruby's Exceptional Creatures — A fun (and dare we say whimsical) guide to exceptions, where each is represented by a different cutesy ‘creature’ (12 so far). It's not all cute drawings, though, as each page defines what each exception is for, shows how they manifest, and how you can manage them properly in your code.

Honeybadger

Prism: Ruby 3.3's New Error-Tolerant Parser — Ruby 3.3 shipped with a much anticipated new default gem called Prism, a new parser for Ruby code that can be depended upon by third party tools that need to work with source code in a structured way. Its creator explains how it came to be and where things are heading next (and you could be a part of this!)

Kevin Newton

Get a Free Ruby on Rails Security & Updates Check — Ensure the safety and integrity of your sensitive information with our advanced Ruby on Rails security measures. Enhance your application's security posture and focus on what you do best – leave the protection to us.

reinteractive/CodeCareShield sponsor

On Ruby's Positional Arguments — The author of the latest Pickaxe book dives deep (and we do mean “deep”) into this subject, explaining how to use splats (*) and arrays, dereferencing args, when to use anonymous args, and how blocks fit in to the conversation.

Noel Rappin

A Packwerk RetrospectivePackwerk is a static analysis tool to help modularize Rails apps that Shopify released in 2020. The Shopify team explains the motivation for building it, the weaknesses encountered in its approach, and how it provoked a rethink in the organization of their monolithic app.

McGibbon and Salzberg (Shopify)

📕 Articles & Tutorials

'The Tech Stack I Chose to Build My Project' — Lucian is working on a project to provide Ruby courses over email and I enjoyed seeing his approach to the overall stack. No big surprises, but it’s nice to see a complete, modern Ruby stack outlined in one place.

Lucian Ghinda

Turbo Frame Search Filters — A fantastically short but sweet blog post on creating a search filter in a Rails app using the added elegance provided by Turbo Frames and Stimulus.

Avi Flombaum

Share Rails-Style Secrets Across Applications — Pain with local dotenv files & duped secrets is no fun, particularly with > 1 app. Try our zero-knowledge CLI app.

Prefab sponsor

An Approach to Client-Side Encryption with Rails and Active Storage — A customer had strict, specific data safety requirements, so Stefan’s team had to work out how to implement client-side encryption in a Rails app.

Stefan Wienert

How to Deal with Postgres Backups using Kamal — A look at using postgres-backup-s3 to periodically backup a database to S3 on a schedule from a Kamal deployed app.

Stefan Botzenhart

🐦 Quick Tip: Using Rails 7.1's log_file_size Option — You can use the config.log_file_size option to define a maximum size for an environment’s log file (after which it will get rotated).

Ruby on Rails on X

Rails 7.1's Support for MessagePack as a Message Serializer
Alkesh Ghorpade

🛠 Code & Tools

rubywm: An Experimental X11 Window Manager in Pure Ruby — If you hang around /r/unixporn (yes, it’s safe for work!) much, you’ll see there’s a lot of experimentation when it comes to Linux window managers, so it’s neat to see a Ruby attempt.

Vidar Hokstad

Lode: PStore, But Even BetterPStore is a long standing standard library that can be used to persist hashes (which may contain other Ruby objects) to disk. Lode adds a DSL and some handy patterns on top of it to provide more structure.

Brooke Kuhlmann

Rails Insights Even Your Leadership Team Will Understand! — Scout APM is made for monitoring Ruby apps. Get all the APM insights and support you need from actual Rails engineers.

Scout APM sponsor

Karafka Framework 2.3 + Web UI 0.8 — Karafka provides a lot of valuable structure when using the Apache Kafka event streaming platform with Ruby and Rails apps. v2.3 adds support for Kafka’s ‘exactly once’ semantics, enhanced multiplexing, periodic jobs, and full error backtraces can now be viewed in the open source version of the Web UI.

Maciej Mensfeld

Web Tsunami: Tailor-Made Load Testing for Webapps — Provides an interesting Ruby DSL for custom load testing scenarios.

Alexis Bernard