- Short Ruby Newsletter
- Posts
- Short Ruby Newsletter - edition 112
Short Ruby Newsletter - edition 112
The one where Jeremy launched the Liminal forum and with many releases - Ruby 3.2.6, Rails 8.0.0.rc2, Hanami 2.0.0.rc1, Rails 7.1.6, Rails 7.2.2 and the big discussion about Fibers
Table of Contents
Unlock Windsurf Editor, by Codeium.
Introducing the Windsurf Editor, the first agentic IDE. All the features you know and love from Codeiumβs extensions plus new capabilities such as Cascade that act as collaborative AI agents, combining the best of copilot and agent systems. This flow state of working with AI creates a step-change in AI capability that results in truly magical moments.
π Launches and discounts
π Jeremy Smith launched Liminal is here - Just forums β no livestreaming, no events, no courses, no chat, Optimized for long-form, async discussion
Source: @jeremysmithco
π Trae Robrock launched Email.rb - Dead simple email. Transactional email shouldn't cost a fortune
Source: @trobrock
π Keygen launched Engines - API Reference - Documentation
Source: @keygen_sh
Source: @pragprog
π Events
π Ruby Conf shared about having a track curated by Akira Matsuda - organiser of RubyKaigi:
Source: @rubyconf
Source: @rubyconf
Tim Riley from Hanamirb also announced a Hanami Hack Day at RubyConf. Details here
π Thoughtbot announced Intro to AI for Rails developers with Chad Pytel
Source: @thoughtbot
π Tropical.Rb launched the tickets last week, but they are now Sold Out
π Check RubyConferences.org for meetups or conferences happening this week and donβt forget to submit yours if you are organising one.
π All about Code and Ruby
π Nagachika shared Ruby 3.2.6 Released
Source: @nagachika
π Nick Quaranto announced that Rubygems reached billions of gem downloads:
Source: @qrush
π Rafael Franca announced Rails 8.0.0.rc2
Source: Rails 8.0.0.rc2
π Tim Riley announced Hanami 2.2.0.rc1
Source: hanamirb.com
π» Code Samples
οΈπ» Drew Bragg wondered about using Ruby methods for adding values and how the send method changes results:
Source: @DRBragg
Ufuk Kayserilioglu explained what happens there:
Source: @paracycle
οΈπ» οΈNate Hopkins shared a code sample about how a Team of AI Agents might look like:
Source: @hopsoft
οΈπ» Josef Strzibny shared a tip about disabling STI in Rails with inheritance_column
:
Source: @strzibnyj
οΈπ» Charles Oliver Nutter shared about JRuby performance:
Source: @headius
and added:
Source: @headius
οΈπ» Stephen Margheim shared a code sample for testing controllers with public methods that do not have a corresponding route defined:
Source: @fractaledmind
π» οΈDaveyon Mayne shared about re-implementing how Basecamp approaches updating a record:
Source: @sylarruby
# Source: https://x.com/sylarruby/status/1851168812705489000
module Orphanage
extend ActiveSupport::Concern
included do
has_many :orphans, class_name: "RecordingOrphan"
end
def adopt(new_object)
transaction do
orphans.create! recordable: recordable, updated_by: User.first
# Change pointer
update! recordable: new_object
end
end
end
#
def update
recording = @parent.children.find(params[:recording_id])
if (@meal = new_meal).valid?
recording.adopt @meal
end
end
οΈπ» Ruby Cademy shared a code sample about runnig ffmpeg to transform audio files:
Source: @RubyCademy
π» Drew Bragg shared a code sample with an interesting behavior:
Source: @drbragg.dev
οΈπ» Wilbert Liu shared about protecting routes in Rails 8:
Source: @wilbertliu
rce: @wilbertliu
Source: @wilbertliu
οΈπ» Kyrylo Silin shared about coloring Rails logger:
Source: @kyrylosilin
Here is code snippted from the gist but you should also read the comments in that gist:
# Source https://gist.github.com/kyrylo/3d90f7a656d1a0accf244b8f1d25999b
module ColorizedLogger
COLOR_CODES = {
debug: "\e[36m", # Cyan
info: "\e[32m", # Green
warn: "\e[33m", # Yellow
error: "\e[31m", # Red
fatal: "\e[35m", # Magenta
unknown: "\e[37m" # White (or terminal default)
}.freeze
RESET = "\e[0m"
def debug(progname = nil, &block)
super(colorize(:debug, progname, &block))
end
def info(progname = nil, &block)
super(colorize(:info, progname, &block))
end
def warn(progname = nil, &block)
super(colorize(:warn, progname, &block))
end
def error(progname = nil, &block)
super(colorize(:error, progname, &block))
end
def fatal(progname = nil, &block)
super(colorize(:fatal, progname, &block))
end
def unknown(progname = nil, &block)
super(colorize(:unknown, progname, &block))
end
private
def colorize(level, message, &block)
"#{COLOR_CODES[level]}#{message || (block && block.call)}#{RESET}"
end
end
Rails.logger.extend(ColorizedLogger)
οΈπ» Ruby Cademy shared a code samplea bout using Symbol to Proc shorthand:
Source: @RubyCademy
οΈπ» Lucian Ghinda shared about using the Ruby debug gem:
Source: @lucianghinda | @lucianghinda.bsky.social
π Thinking about Code Design
π Aaron Patterson shared a thread about fibers, that started like this:
Source: @tenderlove.bsky.social
He shared a couple of gists stating:
βThey don't prevent race conditionsβ β async-race.rb
βThey don't respect GVL releaseβ β test.rb
And added:
Source: @tenderlove.bsky.social
Jp Camara responded to each of them one by one, I am adding here the first reply, but you can read an organised response here:
Source: @jpcamara.com
Samuel Williams also replied with:
Source: @ioquatix.bsky.social
Adam Daniels showed how they are using async:
Source: @adamdaniels.ca
οΈοΈπ Greg Molnar shared about ShiftFast drama:
Source: @GregMolnar
π Jason Swett shared why CanCan's load_and_authorize_resource isn't a good example of DRY:
Source: @JasonSwett
οΈπ Nate Berkopec shared about the ratio of untestable Ruby lines per developer before the risk will go very high:
Source: @nateberkopec
and also shared about queues naming and SLOs:
Source: @nateberkopec
οΈπ Samuel Williams shared a proof of concept for interactive Rails streaming:
Source: @ioquatix (see the video on Threadreader)
οΈπ Nate Berkopec shared about service layer:
Source: @nateberkopec
π‘Around code (news, findings, books, and more - all about Ruby)
π‘ Ruby Association announced the 2024 Ruby Association Grant selection result. There were 3 projects selected:
βPicoRuby2: New PicoRuby Using mruby as VMβ - Hitoshi Hasumi
βThis project will integrate the mruby as a general-purpose embedded language with the PicoRuby ecosystem, which has expertise in microcontroller application development, aiming to bring ISO/IEC 30170-compliant Ruby to microcontroller programming and expand the scope of application developmentβ
βImplementing a plugin system for RDocβ - Masafumi Okura
βThis project aims to implement a plugin system in RDoc so that RDoc can meet diverse requirements and demands and become the central tool for Ruby documentation.β
βCreating a 2D retro game engine based on Processing Gemβ - tokujiros
βBased on last yearβs project, βProcessing Gem for CRuby, working towards better compatibility with the original Processingβ we will leverage the results, namely the Processing Gem, to develop a new 2D retro game engine.
This game engine targets retro games and intentionally limits specifications such as resolution, color palette, and audio features. By simplifying the development process in this way, we aim to create an environment where even beginners can easily start developing games.β
π‘ If you are on Bluesky and posting about Ruby/Rails Joshua Wood is inviting you to fill in this form to be added to his Ruby/Rails Starter Pack:
Source: @joshuawood.net
π‘οΈVictor Cobos shared about using a VScode extension to comment code in ERB:
Source: @elalemanyo
π‘ Nick Schwaderer shared a list of historic_ruby_resources.md
Source: @schwad_rb
π‘ Tom Rossi announced they are starting a Product Founders community:
Source: @tomrossi7
π‘ Jakob Skjerning shared they designed the first Ruby on Rails website:
Source: @jakobs.bsky.social
You can see a way back machine version here.
β€οΈ Why Choose Ruby and Rails
β€οΈ Hans Schnedlitz shared about talking about Ruby on Rails to people from outside our community:
Source: @hschnedlitz
π§° Gems, Libraries, Tools and Updates
π New Gems and Repos
π Yaroslav Shmarov announced a new boilerplate for Rails 8 Moneygun - Multitenancy Teams boilerplate
π Stephen Diaconou announced a new gem awfy: CLI tool to help run suites of benchmarks , and compare results between control implementations, across branches and with or without YJIT
Here is a code sample:
# benchmarks/tests/struct.rb
# A group is a collection of related reports
Awfy.group "Struct" do
# A report is a collection of tests related to one method or feature we want to benchmark
report "#some_method" do
# We do not want to the benchmark to include the creation of the object
my_struct = MyStruct.new(name: "John", age: 30)
ruby_struct = Struct.new(:name, :age).new("John", 30)
dry_struct = DryStruct.new(name: "John", age: 30)
active_model_attributes = ActiveModelAttributes.new(name: "John", age: 30)
# "control" blocks are used to compare the performance to other implementations
control "Ruby Struct" do
ruby_struct.some_method
end
control "Dry::Struct" do
dry_struct.some_method
end
control "ActiveModel::Attributes" do
active_model_attributes.some_method
end
# This is our implementation under test
test "MyStruct" do
my_struct.some_method
end
end
end
π Javi Ramirez announced a new gem trackdown: π Ruby gem to geolocate IPs (MaxMind BYOK)
πBrad Gessler announced a new gem uri-builder - Work with URLs a little easier in Ruby
π Javi Ramirez announced a new gem footprinted: π£ Ruby gem to track geolocated user activity in Rails
π Javi Ramirez announced a new version of nondisposable: ποΈ Block disposable emails in your Rails app
π Kristoph announced a new gem intelligence - A Ruby gem for seamlessly and uniformly interacting with large language and vision model (LLM) API's served by numerous services, including those of OpenAI, Anthropic, Google and others
Source: @ikristoph
π Typecraft published a new repo showing how to configure Neovim to work with Rails - this is a simple ruby on rails configuration for neovim
Source: @typecraft_dev
π Joshua Wood published a new gem about festive_errors - Add some year-round holiday cheer to the Rails error page
π§° Updates
π§° Ruby On Rails announced a new version of Rails Versions 7.1.5 and 7.2.2 have been released!
Source: @rails
π§° Samuel Williams announced a new feature coming in Ruby 3.4 Feature #20855: Introduce Fiber::Scheduler#blocking_region
to avoid stalling the event loop
π§° Postmodern announced a new vulnerability for Sinatra CVE-2024-21510
π§° Mike Dalessio announced a new version of 2024-10-30 Β· sparklemotion/sqlite3-ruby
Source: @flavorjones
π§° Bozhidar Batsov announced a new version of Release RuboCop 1.68 Β· rubocop/rubocop
π§° Maciej Mensfeld noticed tha Jean Boussier is doing a series of improvements for ruby/json:
Source: @maciejmensfeld
π§° Joel Drapper announced that Literal 1.0 is out
Source: @joel.drapper.me
Source: @joel.drapper.me
π§° Hans Schnedlitz announced a new version of puny-monitor - A batteries-included monitoring tool for single hosts. Works great with Kamal
Source: @hschnedlitz
π§° Svyatoslav Kryukov announced a new version of turbo-mount - Use React, Vue, Svelte, and other components with Hotwire
Source: @skryukov.dev
π§° Jeremy Evans announced a new version of Sequel 5.86.0 Released Β· jeremyevans/sequel Β· Discussion #2239
π§° Jet Brains Ruby Mine announced a new version of RubyMine editor:
Source: @rubymine
π§° Samuel Williams announced a merged PR for Rails Donβt buffer things that shouldnβt be buffered
π§° Thomas Leitner announced the version 1.0.0 of HexaPDF
π Keep an eye on
π Jorge Manrubia shared a PR they opened for RubyGems about Add option to configure zeitwerk in new gems by jorgemanrubia Β· Pull Request #8198 Β· rubygems
π€ Xavier Noria shared a quote from The Art of Readable Code:
Source: @fxn
π€ Jason Swett shared a related advice about explaining root cause when fixing a bug:
Source: @JasonSwett
π€ οΈKyrylo Silin shared their thoughts about TDD and the problems with TDD. I am adding here just the first part of the post (you should read it all here)
Source: @kyrylosilin (read it on threadreader)
Here are some replies:
Source: @GregMolnar
Source: @_williamkennedy
Source: @jordanlaubaugh
Source: @madejejej
π€ Kyri shared about how to configure Nginx
Source: @kkyrio
they also shared:
Source: @kkyrio
Source: @heyandras
More content: π π π§ π₯ βπΎ
π Greg Molnar published a new edition of This Week in Rails about Default Regexp.timeout and more!
π Ruby Weekly published a new edition about All Ruby treats, no tricks
π Hotwire Weekly published a new edition about Week 44 - Comparing Hotwire with HTMX, Nested Models in One Form, and more!
π Awesome Ruby Newsletter published a new article about Issue 441 - Benchmarking Ruby Parsers
π§ Podcasts
π§ Adrian Marin published a new episode of Friendly.show about Celebrating Rails World 2024 with Tom Rossi from Buzzsprout. Rails conventions
π§ Indie Rails published a new episode about Just a bunch of guys
π§ Ode to RailsConf published a new episode about Elise Shaffer
π§ Maintainable Software Podcast published a new episode about Obie Fernandez: Pioneering AI in Ruby on Rails Development
π§ The Rails Changelog published a new episode about The Rails Changelog | 027: Migrating a Rails Monolith from MySQL to Trilogy with Adrianna Chang
π§ Thoughtbot published a new episode about 445: Working Iteratively
π§ Remote Ruby published a new episode about RubyGems & Ruby Central with Marty Haught
π§ Ruby Rogues published a new episode about Embracing AI Efficiency in Rails Development - RUBY 658
π½οΈ π₯ Videos
π₯ Kasper Timm Hansen published a new video about Oaken: Fresh take on Fixtures and Seeds - JuliΓ‘n PinzΓ³n Eslava
π₯ TypeFast published a new video about Deploying Rails 7 apps with Kamal 2 with Postgres
π₯ Greg Molnar published a new video about Using Okta with Rails
π₯ Chris Oliver published a new video about How To Use Importmaps With Rails (Example) | GoRails
π₯ Dean De Hart published a new video about Rate Limiting in Ruby on Rails 7.2
π₯ Drifting Ruby published a new video about Turbo Frame Targets and about Kamal Kitchen Sink
π₯ Typecraft published a new video about This is possibly my favorite Neovim and Rails config
π₯ Jeremy Smith published a new video about Liminal - A place for calm, long-form discussions
π₯ Yaroslav Shmarov published a new episode about Exploring the SupeRails source code | SupeRails #207
π₯ DoCodeDo published a new episode about Create Nested Models with One Form // Ruby on Rails Nested Attributes Explained
π₯ Malachi Rails published a new episode about Intro to Ruby on Rails 7 Full stack Tutorial | Rails for Beginners Part 3 and about Intro to Ruby on Rails 7 Full stack Tutorial | Rails for Beginners Part 4
π₯ Arkency published a new episode about 10 Arkency lessons from Rails apps for 2025
π₯ Jason Swett published a new episode about Upgrading SaturnCI to Rails 8.0 and about Mentorship Session with Abhay Joshi (Plus a SaturnCI Update) and about The Terrible Job Market
βπΎ Articles
Whatβs new π
Benoit Daloze published a new article about Benchmarking Ruby Parsers Β· On the Edge of Ruby
RubyCademy published a new article about Did you know that you can control access to inheritance in Ruby?
Jean Boussier published a new article about Next Generation Out of Band Garbage Collection
Radan Skoric published an article about Hotwire and HTMX - Same Principles, Different Approaches
Prasanth Chaduvula published an article about Rails 7.1 Adds after_discard Method To ActiveJob For Discarded Jobs
RoR vs Wild published a new article about Speed Up Compound Full-Text Searches in PostgreSQL by 300x
Bill Tihen published a new article about Rails with Postgres - Fuzzy Searches
Ayush Newatia published an article about The Basics of Rack for Ruby
Lucas M. published an article about Ruby exception Handling Pitfall: Understanding Rescue Clause Hierarchy
Exequiel Rozas published a new article about Serving static assets with a CDN in Rails
Jess Brown published a new article about Let PostgreSQL Generate Your CSV in Rails
David Stosik published a new article about Deploying Writebook with Kamal 2
Fritz Meissner published an article about LLMs can read text: Overlooked AI-assisted coding techniques
DΓ©lon Newman published an article about ruby -run
Daniel Doubrovkine published a new article about Safely Passing Ruby Variables to JavaScript in ERB
How-TOs π
Julian Rubisch published a new article about Refresh when Visible
Rails Designer published an article about Hotwire and Stimulus Tools You Need to Know
William Kennedy published a new article about Up and Running with Hotwire Native iOS 2
Jason Meller published a new article about 1Password and Rails' Kamal: Kindred Spirits
Takashi SAKAGUCHI published an article about Smart way to update multiple models simultaneously in Rails
Igor Alexandrov published a new article about Use Docker to template local database
Jeffery Morhous published an article about A practical GitHub Actions pipeline example with Rails
Jamie Lawrence published an article about Why Podia doesnβt use review apps anymore
BestWeb Ventures published an article about Russian Doll Caching in Rails: A Complete Guide to Fragment Caching Optimization, ViewComponent vs Phlex vs Partials: A Comprehensive Comparison in Ruby on Rails and about Understanding Ruby 3.3 Concurrency: A Comprehensive Guide
Bohdan Pohorilets published an article about [EN] How I upgraded my pet project from Rails 7 to Rails 8 in 30 minutes
RubyCademy published a new article about SQL JOINS: Defeat the monster!
Bozhidar Batsov published a new article about 40 - (think)
Reply