I enjoy creating small automations using Ruby and Bash. While it might
be simpler to use Bash, I like #Ruby so much that I want to use it more.
Here are two examples of how to run all the tests that have changed in
the current branch: an example for Minitest and one for RSpec
How to run all tests from the current branch using Minitest
How to run all tests from the current branch using RSpec
You can, of course, modify this script to become an MCP, enabling tools like Claude Code or Cursor to run tests at the end of an implementation.
During multiple rounds of test runs and fixes, when focusing on each test individually LLMs may pass the most recent test they fixed but fail previous ones.
Once you agreed to a set of tests: either written by you or written by
AIs but guided by you, don't let the AIs to refactor/change the tests
while they are trying to implement a feature.
If your tests are there as specifications, then the implementation
should be constrained by them. Therefore, they should not be changed
unless you direct them to do so.
I am looking at various personal websites mostly focused on researching
personal websites of technical people mostly programmers because I want
to redo my own personal website - which is old and due for a redesign.
And one thing that I noticed as a reader is that sometimes when I click
on the about section the name is not written there.
But let’s be honest, sometimes you just want a framework that’s reliable, efficient, and doesn’t leave you wrestling with configuration files until 3 AM
Source: https://x.com/AmandaBPerino/status/1916800541746749817 or https://threadreaderapp.com/thread/1916800541746749817.html
That’s why I almost always comment on Hacker News or any forum
where I see people still spreading old narratives about Ruby and Rails.
I think we should not just accept them and move on but reply to them and
show why the narrative is wrong. Maybe not with the purpose of
convincing the author who is spreading that narrative but for other
people who might read that without knowing Ruby and Rails. If no one
refutes these statements, people from outside our community could take
them as truth.
I believe it’s important to engage with empathy and try to have a
dialogue with those spreading this myth. We should try to understand
where they heard about it, when they last checked the status of Ruby on
Rails, and how much they know about our ecosystem.
The one with several Ruby releases: 3.4.3, 3.5.0-preview1, and JRuby 10,
where Marco Roth announces herb tools and Matz suggests that Ruby 4.0
may be released this Christmas.
🚀 Launches
Rails Designer launched a new book about JavaScript for Rails Developers is out now. Inside the newsletter, you can find a discount code for 10%
Matt Solt announced the launch of a new AI newsletter - RoboRuby - Ruby AI News
Marco Roth launched a new project → herb - “Powerful and seamless HTML-aware ERB parsing and tooling“
📅 Events:
Friendly.rb announced that their CFP is open until July 1st
Irina Nazarova invited Ruby developers to join the SF Ruby meetup on Wednesday, April 23, at Sentry HQ
Javi Ramirez announced he's organizing a Ruby on Rails meetup near the beach in Lisbon in two weeks
Vienna.Rb announced their upcoming meetup on June 5th, promising an exciting event with great speakers and a mysterious surprise, with more details to be revealed soon
👉 All about Code and Ruby
There are a lot of great news this week:
Takashi Kokubun announced the release of Ruby 3.4.3
Yui Naruse announced a new release of Ruby 3.5.0 preview1
J Ruby Dev Team announced the release of a JRuby 10.0.0.0
Nate Berkopec shared exciting news from RubyKaigi: Matz confirmed that Ruby 4.0 is likely coming this Christmas
Here are some highlights from Code Samples:
Hans Schnedlitz shared a tip about using HTTParty to create custom HTTP clients
Jamie Schembri shared a quick Ruby trick to serve files using just one line of code: ruby -run -e httpd
Brad Gessler proposed a more intuitive Email API for Rails, showcasing a simplified approach to email composition
Gregory Brown shared Conway's Game of Life code with a bug, asking readers to spot what would go wrong
Ruby Cademy revealed a neat ActiveRecord trick: when a RecordInvalid exception is raised, you can access the invalid record using exception.record
Igor Alexandrov shared his Kamal commands cheat sheet, covering essential deployment tasks for Ruby apps
Bhumi shared a handy Rails CLI tip: Running “bin/rails" shows available commands and aliases.
Nidhi Sarvaiya explored the new params.expect feature in Rails 8, finding it offers more robust error handling These were only some of the code samples you can discover inside the newsletter and get inspiration for your daily work.
Inside 📐 Thinking about Code Design you will find:
Nate Berkopec highlights a common Cumulative Layout Shift (CLS) problem in Rails apps: missing image dimensions
Jose Farias shared a Ruby coding style tip: indenting private methods makes it easy to quickly see access restrictions when reviewing code, especially in diffs with limited context
Adam McCrea explained how job queues with different Service Level Objectives (SLOs) can dynamically scale worker processes.
Nate Berkopec shared his take on web application performance
Steven R. Baker suggested cleaning up old Rails migrations after they've been applied in production
JP Camara highlighted a performance improvement in Ruby's Ractor JSON parsing: frozen interned strings are now stored in a lock-free hash
Read the replies around these themes to get more context and maybe get
inspiration about how to approach new solutions.
Inside ❤️ Why Choose Ruby and Rails read Irina Nazarova thread that
starts with powerful quote highlighting Rails as a secret superpower,
revealing how successful companies have been consistently building their
products with Ruby on Rails
🇯🇵 RubyKaigi 2025
In this edition, we added a section dedicated to RubyKaigi 2025. There
were a lot of things shared online and until the videos will be
available here is what you can find out:
Stephen Margheim highlighted Matz's RubyKaigi 2025 closing keynote, emphasizing Ruby's strong potential as a central language in the emerging AI era
Maciej Mensfeld shared exciting news from RubyKaigi: He developed a Ractor-based deserialization engine for Karafka, achieving a 30% performance boost
Mish shared a beautiful illustration with explanations about “How Do Computers Understand Ruby?” during RubyKaigi 2025 and also shared some beautiful notes from the Ruby Commiters and The World.
Yusuke Endoh announced the publication of the winning entries for TRICK 2025, expressing gratitude to all participants, viewers, and judges.
Vladimir Dementyev shared a game → RubyKaigi Warrior 2025 - “Game written in Ruby for learning Ruby”.
Sunao Hogelog Komuro posted an IRB Treasure Hunt game
Marco Roth created a new gem → herb - “Powerful and seamless HTML-aware ERB parsing and tooling“.
Stephen Margheim created a new gem → plume - “Ruby library for working with SQLite elegantly“
Takashi Kokubun announced that upstreamed ZJIT to CRuby. And we tried to include all the slides that the speakers published in a special section called RubyKaigi Slides
🧰 Gems, Libraries, Tools and Updates
Socket announced that Rubygems ecosystem support via Github action is now generally available
Stephen shared a new gem of Takumi Shotoku→ rbs-trace - “RBS::Trace automatically collects argument and return types and saves RBS type declarations as RBS files or comments.“
Cédric Delalande created a new gem → zed-test-toggle - “A small gem to toggle between source and test in the Zed editor“
OpenAI released a new gem → openai-ruby - “OpenAI’s official Ruby SDK“
Nagendra Dhanakeerthi released a new gem → mcp_on_ruby - “A Ruby implementation of the Model Context Protocol“
Burhan Gardezi published a new repository rails_interview_questions - A collection of Rails interview questions categorized by topics
As always, we have more links to newsletters, videos, podcasts, and
articles.
An example of an 1B$ exterior renovation business using #Ruby and Ruby on #Rails sharing why they think
Ruby is a good choice for a business.
> “We strongly believe no other language can keep the same quick pace
that Ruby can when it comes to delivering business value" Source:
RubyCentral
article
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.
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
Ruby Conf Taiwan announced the date August 9-10 for this year event and more information that will coming soon
👉 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
Igor Kasyanchuk published a cheatsheet about Hotwire cheatsheet
Oskars Ezerins published LLMs benchmarks - Popular LLM benchmarks for ruby code generation
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 find a lot of code samples like Kasper Hansen sharing how to use Module.new to create new namespaces, Hans Schnedlitz sharing you can use emoji routes in Rails while Josh Branchaud noted that \#️⃣ is a valid comment syntax in Ruby, Igor Alexandrov shared a code sample using ActionMailer\#email_address_with_name, Andy Croll shared a beautiful one liners in Ruby used to generate the code used for a T-Shirt and much more Ruby and Rails examples that you can get inspiration from.
Remember to read ️ 📐Thinking about Code where Carmine Paolino shared
that by making the transition from Puma, SolidQueue, SolidCable to
another stack like Falcon, AsyncCable, AsyncJobAdapter dramatically
improved LLM response speeds, 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 and much more interesting
discussions.
Inside 💡Around code section read about Ruby Central announcing that the
RubyGems team is strengthening the platform's foundations with new
safety, reliability, and governance policies and Robby Russell
asked his community about the wildest use cases of Ruby on Rails
they've encountered over the years and got some very interesting
and inspiring responses. You should check them out!
🧰 Gems, Libraries, Tools and Updates
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
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
Yorick Jacquin published a new gem fast-mcp → a Ruby Implementation of the Model Context Protocol
Julik Tarkhanov created a new gem serve_byte_range -> Utility module for serving HTTP Range responses without buffering
HCB announced their open source Rails app hackclub/hcb -> The neobank built for nonprofits
Sahil Lavingia announced that flexible is now open source - Payroll & equity for everyone. Look inside app/rails for the Rails app part of flexible
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
You will also find updates on their projects or libraries like Rubocop,
solargraph and httparty.
As always, we have more links to newsletters, videos, podcasts, and
articles.
I used Claude Code to refactor a series of tests from Minitest::Mock to
the Mocha library this
early morning.
The main reason is that I had certain parts of the tests using Mocha and
others utilizing Minitest::Mock. Since other projects I work on use
RSpec, I find Mocha to be closer toons in RSpec, which minimizes the
context change for me overall.
I started with a simple example and provided this prompt:
Go in the test/services/bluesky/save_thread_test.rb and redo the test 'empty result when client returns empty array' to use mocha instead of simple Minitest mock
Here is what Claude Code proposed as a change. It added the line with
instance_variable_set (it is not marked here as a diff because I chose
'No' when it asked me to apply, and I'm not sure why it isn't marked).
What is true is that the SaveThread object is not handling dependency
injection properly: it instantiates a Bluesky::Client, but it does not
accept it during initialization.
Claude Code proposing to use instance_variable_set
So I followed up with:
Instead of doing instance_variable_set wouldnt it be better to do depedency injection in the SaveThread object?
And I got the following answer:
Claude Code proposing to use class_eval to update the initializer
It’s an interesting solution, but I don't like it for obvious reasons:
the object I want to test is also the object that is altered by the test
(which goes against the fundamental principles of testing).
Thus, I asked:
I prefer to change the SaveThread object itself
Notice that it included the client in the initializer, added an
attr_reader for it, and also kept the previous memoized method.
Claude Code changes keeping the memoized method and the attr_reader
In my opinion, this type of behavior reinforces the notion that you need
to know how you want your code to be structured (which I refer to as
code design).
It also seems more important than ever to be able to read a diff and
understand the proposed changes. LLMs may improve over time, but at
least for now, it appears to me that to ensure good code quality, one
must first have enough experience to recognize what good quality is and
be able to determine which changes to accept or reject.