#​614 — July 28, 2022

Read on the Web 🇺🇦

Ruby Weekly

Tracing Ruby’s (Global) VM Lock — A new instrumentation API in Ruby 3.2 (due out in December) exposes GVL events so you can see what your app’s threads are up to. The two (runnable) examples in this post have us giddy to the possibilities.

Ivo Anjo

RuboCop Serves (Much) Faster — If you use RuboCop and you automatically run it on file changes, this news about a new, faster ‘server mode’ might make your day, and you can use the extra seconds spared to bake a cake to celebrate.

Bozhidar Batsov

Debug Ruby Apps in Production Without Stopping Them — Rookout provides developers real-time access to code-level data, logs, traces, and metrics to troubleshoot and debug their cloud-native applications in any environment including production. Debug without having to recreate, redeploy, or stop the app.

Rookout sponsor

How to Track Down Memory Leaks in Ruby — The first in a two part series on how Ruby handles garbage collection and the basics of how to uncover a leak.

Tony Rowan (AppSignal)

Quick Bits:

  • Using a commercial IDE isn't as popular in the Ruby space as in, say, the Go or Java worlds, but plenty of people speak highly of JetBrains' RubyMine and RubyMine 2022.2 has just been released.

  • While looking at Sinatra's latest point release (2.2.2) I noticed a lot of activity has been occurring around a future Sinatra 3.0 release – my fingers are crossed!

  • Some fun with undef – a way to undefine a method on the fly.

  • FirstRubyFriend is a program, created by the organizer of Brighton Ruby, to bring together early career developers and experienced Rubyists for mentorship.

📖 Articles, Stories & Videos

Minitest vs. RSpec in Rails — Tabs or spaces? New York or Chicago pizza? Life is full of choices, and testing in Ruby poses yet another in the form of, most commonly, Minitest vs RSpec. RSpec tends to be the most popular with Rails apps, but it may be worth re-comparing the two approaches.

William Kennedy

Three Practical Uses of method_missing Worth Knowing — Error handling, method delegation, and building DSLs, in particular.

Emmanuel Hayford

▶  Multifactor Authentication via Recovery Codes with RodauthRodauth is a solid alternative to Devise, offering many easy-to-configure options, including creating recovery codes. (4 minutes.)

Janko Marohnić

Troubleshoot & Resolve Bottlenecks & Latency in Your Ruby Code Fast

Datadog APM sponsor

'Galaxy-Brain' CSS Tricks with Hotwire and Rails — I like Matt’s own writeup best for this one: “Techniques for working with CSS in Hotwire and Rails that will make you say “wait..you did that with only CSS?!””

Matt Swanson

How Rails 6+ Lets You Bulk Insert Records — It’s not new, new but handy to know if you’d overlooked insert_all or upsert_all so far.

Alkesh Ghorpade

🛠 Code & Tools

Motor Admin: A 'No-Code' Admin Panel for Apps — Motor Admin can be deployed in “less than a minute” giving you all the CRUD admin actions you’d expect along with some reporting abilities. MIT licensed too. While its aim is to be a tech agnostic admin panel for any database backed system, there's also a Motor Admin Rails engine which bills itself as "a modern ActiveAdmin and RailsAdmin replacement" if you want something closer to your Rails app. Avo is another player in this space worth keeping an eye on.

Motor Admin

jsonb_accessor: Typed jsonb Backed Fields for ActiveRecord Models — This gem goes beyond mere accessors and includes generic scopes for querying JSONB columns, single-table inheritance support, and more.

Tandem

💓 Can Your Error Tracker Monitor Heartbeats? 💓 — Honeybadger also monitors your cron jobs, services or *anything* else you can think of so they don't silently disappear.

Honeybadger sponsor

PublicSuffix: Domain Name Parser for Ruby Based on the Public Suffix List — The idea of the Public Suffix List is simple. It lets you break domains into their unique and common parts - for example, microsoft․com is clearly microsoft and com, but it gets more complicated when you throw country codes, divisions, and popular services into the mix. See the list itself to get the idea.

Simone Carletti

RQRCode 2.1.2: A Ruby Library for Generating QR Codes — It lets you choose a size, set an error correction level, and can output as SVG, PNG, or ASCII.

Duncan Robertson

ID3Tag: Native Ruby MP3 IDv3 Tag Reader Library — You’d use this for pulling out info about the artist, title, and suchlike. It aims for 100% coverage of ID3v2.x and ID3v1.x standards.

Krists Ozols

capybara_table: Capybara Selectors and Matchers for Working with HTML Tables
Jonas Nicklas

⚡️ QUICK RELEASES:

Steep 1.1 – Gradual static type checking for Ruby.
pg 1.4 – Postgres client library.
RuboCop 1.32 – Static code analyzer and formatter.
dotenv 2.8.1 – Loads env variables from .env
Sidekiq-Cron 1.7 – Scheduler / cron for Sidekiq jobs.
Dexter 0.4 – Automatic indexer for Postgres.
Mongoid 8.0.2 – Ruby ODM framework for MongoDB
Que 1.4.1 – Ruby job queue that uses Postgres's advisory locks.
vanity 4.0.3 – Datastore-agnostic A/B testing.
Sinatra 2.2.2

Jobs

Staff Rails Engineer — Ibotta is looking for a Staff Rails Engineer to work on the platform that powers our app that is used by millions of consumers.
Ibotta

Senior Backend Engineer-Ruby on Rails (Remote-United States) — Health tech startup looking for Senior ROR Engineers. Help us build a sustainable future for healthcare professionals!
CareRev

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