Short Ruby Newsletter - edition 129

The one where Ruby 3.1.7 and 3.2.8 are released, Joe Masilotti published Bridge components for Hotwire Native, and two new projects about building or using MCP with Ruby and Rails, a new open source library

In partnership with

Table of Contents

(ad)

πŸ“… Events

πŸ“… African Ruby Community shared that Ruby Conf Africa opened its Call for Papers for this year event which will took place on 18-19th July. If you are interested, here you can submit your talk β†’ CFP Ruby Conf Africa 2025

πŸ“… Euruko announced their 2025 Call for Papers is open, seeking talks on Ruby 3.x evolution, the Ruby ecosystem, and Ruby in production for their "The Heart of Code" themed conference

Source: @euruko

πŸ“… Rubyconftw announced the date for this year event and more information that will coming soon

Source: @rubyconftw

πŸ‘‰ All about Code and Ruby

πŸ‘‰ ️Hiroshi Shibata announced the release of Ruby 3.1.7 (the final version of the 3.1 series) and 3.2.8 (starting the security maintenance phase). He also recommended updating your Ruby to 3.3 or 3.4:

Source: @hsbt.org

πŸ‘‰ Igor Kasyanchuk published a cheatsheet about Hotwire cheatsheet

πŸ‘‰ Russ Olsen shared that he and Brandon Weaver are working on a second edition of Eloquent Ruby, maintaining the original structure while updating it for modern Ruby

πŸ‘‰ Joe Masilotti announced a new library bridge-components that provides ready-to-use UI components for Hotwire Native applications. You can take a look on Github joemasilotti/bridge-components and read more about this amazing gem πŸ’Ž

πŸ‘‰ Samuel Williams announced the availability of Rack documentation

Source: @ioquatix

πŸ’» Code Samples

πŸ’» Kasper Timm Hansen shared a neat Ruby trick to automatically generate namespace modules when using collapsed class names

πŸ’» Hans Schnedlitz discovered that you can use emoji characters as Rails routes, which is a very funny way of writing Rails code πŸ§‘β€πŸ’»

Josh also replied to this post by saying that the hashtag emoji can be used as valid comment syntax in Ruby #️⃣

πŸ’» Joel Drapper shared a left-weighted trigram fuzzy index in Ruby that outperforms Raycast search for relevance. Here you can check this gist β†’ fuzzy_index πŸ”Ž

πŸ’» pankowecki.bsky.social shared a code sample about Slack integration with Rails, pointing to a blog post which is worth reading it β†’ Using HTTP request body for Rails routing: Slack integration case study

πŸ’» Andy Croll shared a clever Ruby one-liner that generates a random number grid by nesting multiple map methods with range operations and the sample method

πŸ’» Igor Alexandrov shared a useful Rails tip about ActionMailer's email_address_with_name method that formats email addresses with sender names, showing it in action within an InvoiceMailer example

οΈπŸ’» Ruby Cademy suggested using Bundler’s inline mode for quick Ruby scripts instead of setting up a Gemfile, demonstrating how it automatically installs missing gems and runs code in one step

Source: @RubyCademy

οΈπŸ’» Ed Izaguirre shared his enthusiasm for RubyLLM, which makes it easier to integrate AI language models into Rails applications

οΈπŸ’» Lucian Ghinda shared a thread about examples of using Data class:

οΈπŸ’» LΓ‘zaro Nixon suggests using esm.sh or copying import map files to your project to solve dependency issues, as it has a pre-build process that improves compatibility

Source: @lazaronixon

οΈπŸ’» Devin Starks shared a useful Ruby tip from Shopify's style guide: use Hash#fetch instead of bracket notation for accessing hash values, as fetch raises a KeyError making typos immediately obvious, while brackets silently return nil

οΈοΈπŸ’» Hans Schnedlitz shared that Kamal Proxy now supports path-based routing, allowing apps to be hosted under different paths instead of subdomains

Source: @hschnedlitz

οΈπŸ’» Benito Serna shared a "Publishable" Rails concern that adds draft/published status to models with visibility controls based on user permissions

Source: @bhserna

οΈπŸ’» Jonathan Frias demonstrated how combining "joins" and "includes" in ActiveRecord queries eliminates duplicates while maintaining eager loading benefits

οΈοΈπŸ’» Hans Schnedlitz shared a Ruby tip about implementing pattern matching for custom models by adding a deconstruct_keys method, demonstrating it with a User class example that supports regex, ranges, and other pattern matching options

Source: @hschnedlitz

οΈπŸ’» Ruby Cademy shared a Rails performance tip showing how to identify what fields are being accessed in a controller action, then optimize queries by selecting only those necessary fields using Article.select instead of Article.all

Source: @RubyCademy

οΈπŸ’» Nidhi Sarvaiya highlighted the usefulness of ActiveRecord's excluding method for cleaner and efficient queries to remove specific records

πŸ’» Sebastian Wilgosz shared a code sample about managing multiple Gemfiles in Ruby

Source: @sebwilgosz

οΈπŸ’» Ruby Cademy shared that in Rails 8, adding ! to a column type in migrations automatically makes it non-nullable, a small but useful improvement to the framework

Source: @RubyCademy

πŸ“ Thinking about Code Design

οΈοΈπŸ“ Carmine Paolino shared that by making the transition from Puma, SolidQueue, SolidCable to another stack like Falcon, AsyncCable, AsyncJobAdapter dramatically improved LLM response speeds

Source: @paolino

οΈπŸ“ Gavin Morrice shared insights on encapsulation, arguing attr_accessor exposes internals and suggests custom methods that validate input, protect state, and separate interface from implementation

οΈπŸ“ Joe Masilotti deployed an API-only Rails app to Render and found that leading slashes in database paths are crucial to prevent SQLite databases from being wiped on every deploy, even with persistent disk setup

οΈπŸ“ Gregory Brown asked what kind of buggy code could cause a Ruby program to repeatedly execute the same sequence before eventually raising a SystemStackError and crashing

πŸ‘€ He got some responses on this topic:

Source: @chrisdurheim.com‬

οΈπŸ“ Nate Berkopec only optimizes for memory usage when he knows a transaction will create over 1 million objects, otherwise letting performance profiles guide his optimization decisions πŸ’‘

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

πŸ’‘ Ruby Central announced that the RubyGems team is strengthening the platform's foundations with new safety, reliability, and governance policies. These policies are open for community feedback over the next 60 days. For more info you can check their post β†’ Introducing New Policies to Support the Growth of RubyGems

πŸ’‘ Robby Russell asked his community about the wildest use cases of Ruby on Rails they've encountered over the years

And he got some interesting responses 🀩:

Source: @ehayes

Source: @APIguy

Source: @dneighbors

Source: @ncubegiven_

❀️ Why Choose Ruby and Rails

❀️ David Heinemeier Hansson responded to Andrej's post noting that Rails has always been a rebellion against piecemeal development approaches. Rails 8 is more fullstack than ever, with complete integration from backend to frontend, deployment and production, all without cloud vendor lock-in. Below is also the Andrej post which is worth reading it:

Source: @dhh (reply from Andrej Karpathy)

Source: @karpathy

❀️ Igor Alexandrov highlighted Rails' advantages: unified frontend/backend with Hotwire, built-in authentication, Docker deployment via Kamal, preconfigured CI, and developer productivity comparable to entire teams

Source: @igor_alexandrov (reply from Andrej Karpathy)

🧰 Gems, Libraries, Tools and Updates

πŸ†• New Gems and Repos

πŸ†• Alessandro Rodi released Letter Thief, a gem for logging emails in Rails apps that stores them in your database and can open them in development, similar to letter_opener. This gem is available to use from Github coorasse/letter_thief

Source: @coorasse

πŸ†• Abdelkader Boudih launched a new gem β†’ mcp_rails_template (A minimal Rails API template for creating MCP servers with robust tool execution capabilities and examples). The gem is available and worth checking on Github seuros/mcp_rails_template

Source: @seuross

πŸ†• Yorick Jacquin published a new gem fast-mcp β†’ a Ruby Implementation of the Model Context Protocol πŸ“. You can check this gem on Github: yjacquin/fast-mcp

Source: @aviflombaum

πŸ†• Julik Tarkhanov created a new gem serve_byte_range (Utility module for serving HTTP Range responses without buffering). This gem is up on Github β†’ julik/serve_byte_range

Source: @juliknl

πŸ†• Hcb announced their open source Rails app hackclub/hcb: 🏦 The neobank built for nonprofits.

Source: @HackClubHCB

πŸ†• Sahil Lavingia announced that flexible is now open source at flexible - Payroll & equity for everyone. Look inside app/rails for the Rails app part of flexible

Source: @shl

πŸ†• Davide Santangelo published a new gem hyll - "Hyll provides a robust implementation of the HyperLogLog algorithm, enabling highly accurate cardinality estimation (counting unique items) with minimal memory footprint. Perfect for analytics, databases, and stream processing where tracking distinct elements in large datasets is required. This implementation offers configurable precision and serialization support."

🧰 Updates

🧰 Bozhidar Batsov (a.k.a. Bug) announced a new release for RubuCop v1.75.0 (A Ruby static code analyzer and formatter, based on the community Ruby style guide)

🧰 Fred Snyder announced a new version of solargraph

🧰 John Nunemaker announced a new version of httparty πŸ₯³ (A popular Ruby gem that makes HTTP requests simple and fun, with an intuitive API for both quick scripting and class-based organization)

🀝 Prajwal Tomar posted a thread about his new "knowledge base" technique for Cursor that reportedly reduces AI hallucinations and assumptions by 85%. This thread contains plenty of details and interesting insights, and is worth checking it on X πŸ€–

Source: @PrajwalTomar_ (check full thread on X)

🀝 Gergely Orosz explained that successful indie developer SaaS stories are outliers, with the real challenge not in building products but in finding viable market niches that attract customers without drawing competition from larger companies. This is an amazing thread, and is highly recommended to check it completely on X

Source: @GergelyOrosz (check full thread on X)

Source: @GergelyOrosz (check full thread on X)

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

πŸ—ž Newsletters

πŸ—ž Ruby On Rails published a new edition of their newsletter β†’ Capturing error reports in tests and more

πŸ—ž Ruby Weekly published a new article about How good different LLMs are at writing Ruby code

πŸ—ž Hotwire Weekly published a new article about Week 13 - Hotwire Native Bridge Components, Hotwire Cheatsheet, and more!

πŸ—ž Women On Rails Newsletter International Version published a new article about Newsletter WoR #60: AI everywhere, DEI is dead (?), more humans in DevOps solutions...

πŸ—ž RubyCademy published a new edition of their newsletter β†’ The Art of Ruby Scripting

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

πŸ—ž Awesome Ruby Newsletter published a new article about Issue 462 - The future of AI is Ruby on Rails

🎧 Podcasts

🎧 David Hill published a new podcast β†’ Freedom Dumlao - Ode to RailsConf

🎧 Chris Oliver, Andrew Mason published a new podcast β†’ The Learn Hotwire Course, GitHub Sign-off for CI and Yarn versions

πŸŽ₯ Videos

πŸŽ₯ Gavin Morrice published a new video about How to protect your Ruby code from common attacks

πŸŽ₯ Chris Oliver posted a new video about VCR re_record_interval_option

πŸŽ₯ Yaroslav Shmarov published a new video

πŸŽ₯ Drifting Ruby published a new video about Chat Agent

πŸŽ₯ Jason Swett published a new video about Nailing Down the Conceptual Model for Users - Live Coding on SaturnCI

πŸŽ₯ Ken Greeff published a new video about Sorting Images with Sortable.js and Stimulus in Rails

πŸŽ₯ Rails Quest by Kaleb Lape published a new video about Rails 8 + The Good Migrations Gem: Avoid These Database Migration Footguns

✍🏾 Articles

What’s new πŸ†•

πŸ†• Josef Strzibny published a new article about The future of Rails front-end is hybrid

πŸ†• Igor Kasyanchuk published a new article about Hotwire cheatsheet

πŸ†• Saeloun Blog published a new article about Rails 8 Removes Channels From Default App Structure

πŸ†• JoΓ«l Quenneville published a new article about Reasoning by Analogy

πŸ†• TrΓ©sor Bireke published a new article about Using the Presenter Pattern in Ruby on Rails

πŸ†• Mintbit published a new article about Hiding Unfinished Features in Rails - Mintbit

πŸ†• Radan Skoric published a new article about Rails 8 Assets: Combining importmaps

πŸ†• JoΓ© Dupuis published a new article about Thruster vs Kamal-proxy: Which HTTP proxy is right for you?

πŸ†• Scout APM published a new article about Caching Strategies for Ultra-High Performance in Ruby on Rails, Part 2

πŸ†• Rails Designer published a new article about Touch Events (swipe) using Stimulus

πŸ†• Lucian Ghinda published a new article about Example of value objects using Ruby's Data class

How-TOs πŸ“

πŸ“ Tejas Bubane published a new article about Using PostgreSQL database constraints

✍️ Dave Thomas published an article about Throwing the Babies Out With the Bathwater

✍️ Rich Steinmetz published a new article about DNS brain teaser for your engineering brain

✍️ Travis Turner published a new article about Hey developer tool teams, don’t copy these copywriting clichΓ©s!

Reply

or to participate.