#​622 — September 29, 2022

Read on the Web

Ruby Weekly

Phlex: A New Component-Oriented View Framework — Author Joel Drapper has certainly been putting in the effort since creating Phlex a few months ago. It lets you treat everything on a Web page as a distinct component and manage them all as plain old Ruby objects – the view format itself is also entirely pure Ruby which might remind you of _why’s Markaby a little! There’s a ERB to Phlex converter you can play with to see how it looks. GitHub repo.

Joel Drapper

💡 It's early days, so tutorials are thin on the ground, but phlex-sinatra shows off how to use Phlex from Sinatra which I found instructive. Also, if you're already a ViewComponent user, Joel explains how Phlex is different here.

Is Your App’s Heart Beating?💓 — Remember when your monthly backup failed, or when those customers didn't get billed? How did you find out? Our heartbeat feature monitors critical tasks, so that you'll never miss another silent failure. When Honeybadger is quiet, life is good.

Honeybadger sponsor

Sidekiq 7.0 Beta Now Available — Mike has a lot of exclamation points to share with this preview of the next version of Ruby’s most popular background job processing system. The new features are explained here and include job metrics, being able to embed Sidekiq within another process, a big update to how Sidekiq communicates with Redis, and more.

Mike Perham

Sinatra 3.0 Was Released; Did Anyone Notice? — One of Ruby’s most popular and long standing ways to build webapps (and the original inspiration for Node’s Express) has had a major update, though it doesn’t seem to be getting discussed anywhere yet (no post on the official Sinatra blog either). We’re still digging into this and will cover it in more depth next week, but.. it’s out!

Haase, Tomayko, Mizerany et al.

Put: A Better Way to Sort Ruby Objects? — The go-to way to sort Ruby objects by complex criteria is Enumerable’s sort_by method. The new Put library, however, aims to make such sorting clearer, terser, and nil-safe. There’s even a screencast showing it off.

Justin Searls

QUICK BITS:

📖 Articles, Stories & Videos

How to Install Ruby in macOS for Local Development — Using system Ruby or brew install ruby isn’t the way to go – something like rbenv or RVM will help manage your install better (though I use asdf, myself).

Liran Tal

Creating Continuous Aggregates with Ruby and Timescale — Continuous aggregates use materialized views to continuously and incrementally refresh a query so that only data that has changed needs to be computed, not the entire dataset.

Jônatas Davi Paganini

Free eBook: Advanced Database Programming with Rails and Postgres — Learn about subqueries, materialized views, and custom data types in Postgres & Rails and follow along with our examples.

pganalyze sponsor

Six Ways to Create Enumerated Types in Rails and Postgres — If you want to constrain the list of legitimate values for a column, there are a few ways to do it depending on your environment and tolerance for some extra coding.

Matthew Bellantoni

Enabling Remote ruby/debug Debugging in Rails 7
Ayush Newatia

How to Create and Use an SQL View in a Rails App
Igor Kasyanchuk

Shopify's Flexible Framework for Effective Pair Programming
Raymond Chung

Simplify Your System Debugging by Introducing Event Store Linking
Łukasz Reszkę

🛠 Code & Tools

Retriable: A DSL to Retry Failed Code Blocks — Lets failed blocks be retried with randomized exponential backoff time intervals.

Jack Chu

ngx_mruby: A Fast and Efficient nginx Extension Mechanism Using mruby — Yes, you can implement nginx modules in Ruby.

Ryosuke Matsumoto

The Developer Experience You Always Wanted for Postgres

Crunchy Bridge sponsor

Spy: A Simple Opinionated Mocking Framework — Inspired by the Spy mechanism in JavaScript’s Jasmine BDD framework, this is a “smart” mocking framework, so it will raise errors if you mock non-existent methods, don’t match arity, etc.

Ryan Ong

Jobs

Serving Podcasts with RoR? ✅ — Join our experienced and friendly team as a Software Developer (f/x/m) and work on a high-traffic RoR app serving a growing industry.
Podigee GmbH

Find Ruby Jobs Through Hired — Create a profile on Hired to connect with hiring managers at growing startups and Fortune 500 companies. It's free for job-seekers.
Hired