#​686 — January 18, 2024

Read on the Web

Together with  Shift

Ruby Weekly

Ruby (3.3) on Rails (1.0) — Rails 1.0 was released about eighteen years ago (I know!) – just a day after Ruby 1.8.4. Things have changed a bit since then [citation needed], but surely a modern Ruby could still run Rails 1.0? Sort of..! (It’s funny to see bundler being used, though, as it didn’t even exist at the time, and even RubyGems itself wasn’t a default part of Ruby 1.8!)

Vasiliy Ermolovich

Stuck on a Tough Ruby Challenge? Shift’s Got Your Back — Need a hand with writing cleaner code, improving your tests or solving those tricky Ruby issues? At Shift, we understand the power of collaboration through Pair Programming & our expert developers know the intricacies of Ruby. Learn more here.

Shift Interactive sponsor

📕  Programming Ruby 3.3 (5th Edition) Now in Print — Affectionately known as the Pickaxe due to its cover image, Programming Ruby is a book that, in its early editions, certainly helped launch the career of many a Rubyist. It’s back, focused on Ruby 3.3, and has a new lead author, Noel Rappin.

The Pragmatic Bookshelf

💡 Noel has blogged further about the release and what it entailed. We also interviewed him about the book's development back in issue 630.

The Answer is in Your Heap: Debugging a Big Memory Increase — The tale of debugging a memory increase seen when an app was upgraded from Rails 7.0 to 7.1. Derailed Benchmarks and a heap analyzer called Sheap were used, with the work resulting in a patch included in Rails 7.1.3.

Ben Sheldon

Ruby 3.2.3 Released — Yay, a new Ruby release! Okay, it’s no Ruby 3.3, but if you have 3.2 in production, this is for you, complete with bug fixes and the inclusion of the uri update that fixed this vulnerability.


🐢 Is Tech Debt Slowing Down Your Product Roadmap? Let Us Help — Starting at $2,000/month, Bonsai is the cost-effective way to gradually modernize your Sinatra, Roda, or Hanami app 🚀

Bonsai by FastRuby.io sponsor

📕 Articles & Tutorials

A 'Weird' Way to Filter Out ElementsSpoiler: It’s Enumerable#grep_v, which has an interesting property that makes it worth considering in some cases.

Bozhidar Batsov

How to Find Method Definitions in IRB — Several examples of finding sources in IRB (and therefore Rails console) using ls, method, source_location, and show_source.

Lucian Ghinda

The First Commits to a Rails App — Lucian likes to get started by introducing best practices with automated quality and security checks, before getting into the meat of an app.

Lucian Ghinda

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

Horizontally Scaling a Rails Backend at Shopify with Vitess — Shopify has a lot of scalability problems that most of us don’t, but if you do need to shard and scale MySQL, Vitess offers a good approach.

Hammad Khalid (Shopify)

▶  How to Send Notifications in Rails with Noticed v2Noticed is a gem for sending various types of notification from Rails apps.

Chris Oliver

How to Process a Turbo Stream Response in JS with Stimulus
Akshay Khot

Hotwire or a Frontend Framework for Your Next Rails Project?
Radan Skorić

Three Approaches for Inline SVGs in Rails Apps
Tomas Valent

Reading Kamal Configs in Ruby
Josef Strzibny

🛠 Code & Tools

Introducing pg_query for Postgres 16pg_query is a long standing library for turning SQL queries into parse trees, by way of Postgres's own SQL parser. This new version is based on the Postgres 16 parser, supports SQL/JSON, and now works on Windows too.

Fittl & Mijalkovic (pganalyze)

Commander 5.0: A One Stop Shop for Building Command Line Tools — Not many Ruby libraries have releases spanning three decades, but Commander is one. It brings together features from other libraries to let you more quickly build CLI apps with option parsing, docs, notifications, terminal interaction, etc.

Gabriel Gilder and others