Short Ruby Newsletter - edition 133

The one where YCombinator showcases Ruby code in their Vibe Coding video, mruby 3.4.0 released, Hotwire Native 1.2 is announced, and where Pragmatic Programmers are offering a fantastic discount

In partnership with

Table of Contents

(ad)

Tired of your app falling down at the worst possible time? We make autoscaling that works out-of-the-box, so your servers can handle traffic spikes with ease.

Judoscale is the autoscaler you need for Heroku, Amazon ECS, Render, and Fly.

πŸš€ Launches and discounts

πŸš€ The Pragmatic Bookshelf is running their Spring Best Sellers Sale, featuring Ruby/Rails books at 40% off this week only. Use code 2025RAILS at checkout until April 29

πŸš€ Ed Izaguirre announced the launch of The Digital Press, an AI-curated personalized newsletter. In his thread, he explains how it works, how they built it, and what they learned during development

πŸ“… Events

πŸ“… African Ruby Community announced that early bird ticket sales have started for their conference. They're inviting people to book slots for Africa's biggest Ruby event at rubyconf.africa/tickets πŸŽ‰

πŸ‘‰ All about Code and Ruby

πŸ‘‰ Bram Jetten published a new article about The One-Person Framework in practice

πŸ‘‰ Aaron Patterson shared a code sample and benchmark results showing Ruby 3.5's significant performance improvement in object allocation. For more details check his PR β†’ Inline Class#new. #13080

πŸ‘‰Jean Boussier published a new article about about Unlocking Ractors: object_id - there are many insights that you can find in that article

πŸ†• Hasumi Hitoshi announced a new version of mruby 3.4.0 - β€œmruby is the lightweight implementation of the Ruby language complying with part of the ISO standard. mruby can be linked and embedded within your applicationβ€œ

πŸ’» Code Samples

οΈπŸ’» Jamie Schembri shared a time-saving Bundler tip. Since version 2.5.10, you can enable automatic gem installation by running bundle config --global auto_install true

οΈπŸ’» Josef Strzibny shared how to customize Rails' .field_with_errors behavior

Source: @strzibnyj

οΈπŸ’» Matt Swanson suggested we should stop focusing on specific LLM model versions and instead use descriptive terms like "cheap" or "smart" when requesting models. He shared code showing this approach, using β€œ:cheap” as the model parameter

Source: @_swanson

οΈπŸ’» John Nunemaker shared a simple middleware solution for blocking IP addresses using Flipper

Source: @jnunemaker

οΈπŸ’» Ruby Cademy asked about using pattern matching for type-checking method arguments in Ruby. Their example shows a β€œprocess_response”method that uses pattern matching to ensure the input is a String before trying to parse it as JSON.

Source: @RubyCademy

οΈοΈπŸ’» Elvinas Predkelis joked that he didn't expect modern Ruby to be so "GenZ," showing code that uses the trendy shorthand β€œmethods.map { send(it) }” syntax

Source: @predkelis

πŸ’» Ruby Cademy shared a code sample showing why using β€œwith_defaults()” is more readable than β€œreverse_merge()” for handling default values in Ruby hash variables, even though they're actually the same function

Source: @RubyCademy

οΈπŸ’» Kaka Ruto shared a code sample from their real estate AI platform showing complex access limit management

Source: @kaka_ruto

οΈπŸ’» Ruby Cademy shared a code sample demonstrating how using β€œdelegate” with β€œprefix: true” in Ruby on Rails models improves code when working with associations

Source: @RubyCademy

οΈπŸ’» Alex Yarotsky shared a code sample explaining how to avoid race conditions in database operations using "SELECT ... FOR UPDATE"

πŸ“ Thinking about Code Design

οΈοΈπŸ“ Nate Berkopec shared that Ruby's gRPC gem is surprisingly large (bigger than Ruby itself) and often causes bugs and instability, making it a dependency they try to avoid despite recent improvements

οΈπŸ“ Greg Molnar shared security concerns about HTTP Basic Authentication, warning it's unsafe for serious applications because credentials are only base64 encoded (vulnerable to sniffing), and it lacks rate-limiting, session termination control, and CSRF protection

Source: @GregMolnar

Julik replied:

Source: @juliknl

οΈπŸ“ Steven R. Baker warned that every extra gem in your Gemfile doubles the time needed to upgrade Rails

Source: @srbaker

πŸ’‘Around code (news, findings, books, and more - all about Ruby)

πŸ’‘ Rosa Gutierrez shared how the Shakespeare/Cervantes death date coincidence (April 23, 1616) actually involved different calendars, with Shakespeare dying 10 days later in the Gregorian calendar

Source: @rosa.codes

And Andrew replied that they used this example in Ruby documentation to explain when to use Time vs DateTime classes πŸ•°οΈ

❀️ Why Choose Ruby and Rails

❀️ Kieran Klaassen shared that Rails empowers individual developers to build valuable businesses, noting that a single developer using Rails can create and maintain a seven-figure business without needing microservices or large specialized teams

🧰 Gems, Libraries, Tools and Updates

πŸ†• New Gems and Repos

πŸ†• Andrew Kane created a new gem β†’ sqlite3-ffi - β€œA drop-in replacement for sqlite3 for JRubyβ€œ. Gem available on Github: ankane/sqlite3-ffi

πŸ†• Sokmesa Khiev created a new gem β†’ ai_localized - β€œAI Localizer is a powerful Ruby gem designed to streamline internationalization (i18n) by leveraging Large Language Models (LLMs) to automatically translate localization files into multiple target languages”. Gem available on Github: sokmesakhiev/ai_localizer

πŸ†• Joel Drapper created a new gem β†’ AyeVar - β€œA Ruby gem to keep your instance variables in checkβ€œ. Gem available on Github: joeldrapper/aye_var

πŸ†•Robert published a new gem llm.rb - Ruby adapter for various LLM providers - β€œ it has been implemented with zero dependencies outside Ruby's standard library”

🧰 Updates

🧰 David Heinemeier Hansson announced a new version of Hotwire Native - β€œHotwire Native is a web-first framework for building native mobile appsβ€œ. Check the blog post for more details on this release β†’ Announcing Hotwire Native 1.2 by Jay Ohms

Source: @dhh

Joe shared his excitement about Hotwire Native demo server app being rewritten in Ruby on Rails, making it easier to understand server-side implementations of forms, flash messages, redirects, authentication, and bridge components

And Bruno found the source code for the demo β†’ hotwire-native-demo

Source: @BrunoGCruz

🧰 Chris Oliver announced an update for pay-rails/pay - β€œPayments for Ruby on Rails appsβ€œ

🧰 CΓ©dric Delalande announced a new version of barley - β€œBarley is a fast and efficient ActiveModel serializerβ€œ

🧰 Igor Alexandrov opened a pull request adding autocomplete support and a kad alias (for kamal deploy) to Kamal, inspired by Capistrano's cap command that Ruby developers used for years. For more details, check out his PR β†’ feat(kamal): add autocomplete support and aliases for Kamal (https://kamal-deploy.org/) #13080

More content: πŸ“š πŸ—ž 🎧 πŸŽ₯ ✍🏾

πŸ“š Maciej Mensfeld posted his slides from RubyKaigi 2025 β†’ Bringing Linux pidfd to Ruby

πŸ—ž Newsletters

πŸ—ž This Week in Rails published a new edition about Continuously improving the framework

πŸ—ž Hotwire Weekly posted a new edition of their newsletter β†’ Week 16 - Introducing Herb, JSX over the Wire, and more!

πŸ—ž Ruby Weekly published a new edition about Releases, releases, and more releases

πŸ—ž Matt Solt published a new edition of Ruby AI News β†’ Ruby AI News - April 24th, 2025

πŸ—ž Awesome Ruby Newsletter published a new edition about Issue 466 - Understanding Ruby’s tap β€” A Powerful Debugging and Configuration Tool

πŸ—ž Ruby Central published a new edition about Ruby Central's OSS Changelog: April 2025

πŸ—ž Andy Croll published a new edition of One Ruby Thing about Using Deep Duplication to Avoid Surprises

🎧 Podcasts

🎧 The Ruby On Rails Podcast published a new podcast β†’ Episode 535: Judoscale with Adam McCrea

🎧 David Hill published a new podcast β†’ Ode to RailsConf - Rhiannon Payne

🎧 Maintainable Software Podcast published a new podcast β†’ Freedom Dumlao: What 70 Java Services Taught Me About Focus

🎧 Rooftop Ruby Podcast published a new podcast β†’ 42: You Can Go Any Speed You Want

🎧 Giant Robots Smashing Into Other Giant Robots published a new article about Giant Robots Ep 571: Space, Software, and Surprises with Rémy Hannequin

🎧 Remote Ruby published a new article about São Paulo to Sin City

πŸŽ₯ Videos

πŸŽ₯ YCombinator published a video How To Get The Most Out Of Vibe Coding | Startup School

πŸŽ₯ Graceful.Dev published a new video β†’ Subclassing Array in Ruby

πŸŽ₯ Tropical.Rb published a new video β†’ Irina Nazarova (CEO @ Evil Martians) - Startup on Rails

πŸŽ₯ SupeRails published a new video about #238 Deploy Rails 8 to Render.com. Solid Trifecta on Postgres

πŸŽ₯ Zhephyn published a new video from the reading club β†’ Ruby Jr Dev Book Club - Eloquent Ruby - Chapters 21-22 and Ruby Jr Dev Book Club - Eloquent Ruby - Chapter 23

πŸŽ₯ Ruby Cademy published a new video β†’ Don't overcomplicate refactoring

πŸŽ₯ Yaroslav Shmarov published a new video β†’ Deploy Rails 8 to Render.com. Solid Trifecta on Postgres

πŸŽ₯ Lucian Ghinda posted a new video β†’ Why I Am Using Getter Methods Over Instance Variables in Ruby

πŸŽ₯ Drifting Ruby published a new video about Application Templates | Drifting Ruby

πŸŽ₯ montreal-rb published a new video about Montreal.rb April 2025 Domain Driven Design in Ruby on Rails

✍🏾 Articles

What’s new πŸ†•

πŸ†• Julik Tarkhanov published a new article about A Can of Shardines: SQLite Multitenancy With Rails

πŸ†• Vishnu M published a new article about Scaling Rails Series and you can read the first article Understanding Puma, Concurrency, and the Effect of the GVL on Performance

πŸ†• Mohammad A. Ali published a new article about Ruby data serialization options in 2025

πŸ†• Jean Boussier published a new article about Unlocking Ractors: object_id

πŸ†• Dave Thomas published a new article about Premature Design Is Not Design

πŸ†• Bram Jetten published a new article about The One-Person Framework in practice

πŸ†• Sara Jackson published a new article about Making the case for Rails monoliths over microservices

πŸ†• Jake Zimmerman published a new article about Past, Present, and Future of Sorbet Type Syntax

πŸ†• Jamie Schembri published a new article about The SOLID Principles and about SOLID: The Single-Responsibility Principle (SRP)

πŸ†• RΓ©my Hannequin published a new article about Between immutability and memoization, you might have to choose

πŸ†• Yutaka Hasoai published an article about Secure Coding in Ruby on Rails

πŸ†• Jeremy Kreutzbender published a new article about Preloading Nested Active Record Associations Syntax

πŸ†• Stanko Krtalic published a new article about Building Simpl息

πŸ†• Matt Stuchlik published a new article about [WIP] Low Overhead Tracing Profiler for Ruby

πŸ†• Amanda Bizzinotto published a new article about Extracting Deprecation Warnings from the Rails Source Code

πŸ†• Louis Antonopoulos published a new article about Don't Steal a Penguin -- A Guide to Rails Flashes

πŸ†• Lucian Ghinda published a new article about Prefer getter methods over instance variables inside Ruby objects

πŸ†• Stephen and Alan published a new article about Seamless Loading with Hotwire Native

πŸ†• Avo published a new article about Adding shortcodes to the Marksmith editor

πŸ†• Ismael Celis published a new article about Give it time - Modeling your domain as timelines instead of object graphs

πŸ†• Rails Designer published a new article about Keep Active Record models clean with Decorators

How-TOs πŸ“

πŸ“ Joey Wang published a new article about Debugging Transaction Deadlocks in Rails Tests: A Case Study

πŸ“ Stephen Nelson written a new article about Seamless Loading with Hotwire Native

πŸ“ Rails Designer published a new article about Sanitize your strings in JavaScript like a Rails developer

✍️ Maciej Mensfeld published a new article about From pidfd to Shimanami Kaido: My RubyKaigi 2025 Experience - Closer to Code

Reply

or to participate.