Short Ruby Newsletter - edition 109

The one with Ruby 3.4.0-preview2 launch, videos from Rails World published, Xavier explaining how Zeitwerk and namespacing work and inspiring Ruby code samples

In partnership with

Table of Contents

Streamline your development process with Pinataโ€™s easy File API

  • Easy file uploads and retrieval in minutes

  • No complex setup or infrastructure needed

  • Focus on building, not configurations

๐Ÿš€ Launches and discounts

๐Ÿš€ Andy Croll launched usingrails.com - a directory to gather all organisations that are using Ruby on Rails:

Submit your company at https://usingrails.com

After creating a new account, you can submit a website directly via the web interface at https://usingrails.com/submissions/new.

Source: @coolprobn

๐Ÿš€ Greg Molnar launched Introducing Silk Rail

Source: @GregMolnar

๐Ÿ“… Events

๐Ÿ“… One month away until RubyConf 2024 if you plan to go now it is a good time to buy ticket and plan your trip:

๐Ÿ“… Tropical.Rb tickets will go on sale on October 30th, 2024! Donโ€™t miss out and get ready to hit F5!

๐Ÿ“… Ruby Banitsa conf will be hosted on December 7th, 2024 in Sofia, Bulgaria with Kasper Timm Hansen as their international guest.

๐Ÿ“… Errol Schmidt invited leaders in Ruby community to an Exclusive Rubyconf Chicago Dinner: Network with Industry Leaders

๐Ÿ“… Here is a list of Meetups happening this week (source: rubyconferences.org/meetups)

๐Ÿ‘‰ All about Code and Ruby

๐Ÿ‘‰ ๏ธYui Naruse shared a new release of Ruby - 3.4.0.preview2

๏ธ๐Ÿ’ป Xavier Noria shared a long post about the new version of Zeitwerk explaining how it works. Here is just the first part of the post, but you should read it full.

He later added:

Source: @fxn

๐Ÿ’ป Code Samples

๐Ÿ’ป Saeloun shared Railsโ€™s ability to ignore counter cache columns while they are backfilling

๏ธ๐Ÿ’ป ๏ธKyrylo Silin shares how importmap can check dependencies for vulnerabilities

๐Ÿ’ป ๏ธ Jorge Manrubia shared why loading Rails fixtures as part of seeding is a great idea!

๏ธ๐Ÿ’ป Deepak Mahakale shared the new addition on rails 8 that helps you drop multiple tables with a single command

๐Ÿ’ป Ruby Cademy shared Railsโ€™s new added support for using hashes in select

Also, this is how you can take advantage of the rails runner command and Bash Heredocs

๐Ÿ’ป ๏ธMichael Chaney highlights the flexibility of Rails in handling attribute normalization

He also shared the following on query building:

๐Ÿ’ป Prabin Poudel shared a code sample to implement copy to clipboard feature with StimulusJS and TailwindCSS/DaisyUI

๏ธ๐Ÿ’ป Emmanuel Hayford shared about using the allow_browser:

๏ธ๐Ÿ’ป Tomoya Ishida shared ruby_syntax_fuzzer.rb

Source: tompng

๏ธ๐Ÿ’ป Ruby Cademy shared a code sample showing how to use extend on the same line:

Source: @RubyCademy

They shared some examples from MailCatcher or Capnp integration:

Source: @RubyCademy

๏ธ๐Ÿ’ป Gregory Brown shared about how to read code:

๏ธ๐Ÿ’ป David Alejandro reminded us that Turbo Mount can help with quickly using React/Vue/Svelte components with Hotwire:

๏ธ๐Ÿ’ป Igor Alexandrov shared how to get the Ruby version in Kamal from .ruby-version file

And you can then use it in the Dockerfile:

๏ธ๐Ÿ’ป Joey Wang shared about how to debug Devise:

# Assuming we're inside the original current_user method
# Get the current method object
current_
method = method(__method__)

# Define the new method
new_method = proc do |*args|
  puts "Entering modified current_user method"
  result = current_method.call(*args)
  puts "current_user result: #{result. inspect}"
  # debugger
  result
end
# Replace the method
self.class.send :define_method,__method__, new_method)
self.class.send :define_method, "old_#{__method__}", current _method)

# Restore the old method
old_method = method ("old_#{__method__}")
self.class.send(:define_method,__method__, old_method)
self.class.send(:undef_method, "old_#{__method

# Call the new method to continue execution
new_method.call

Source: @alazycoder2

๐Ÿ“ Thinking about Code Design

๏ธ๐Ÿ“ David Heinemeier Hansson shared about caching and no build strategy:

Source: @dhh

Jean Boussier explained why the results are the way they look like:

Source: @_byroot (Read on Threadreader)

๏ธ๐Ÿ“๏ธ Steven R. Baker discusses on how Minitest is prefered over Rspec for its simplicity and portability

๏ธ๐Ÿ“ John Pollard asked about refactoring variables set in a view: ๏ธ

Here are some replies:

Source: @robzolkos

Source: @marcoroth_

Source: @RailsQuest

Source: @tomrossi7

Source: @rebootxapp

๐Ÿ“ David Backeus shared about performance for Rails + ActiveRecord:

Source: @dbackeus

Source: @dbackeus

๐Ÿ“ Mika Henriksson asked about using kamal-proxy with more than one server:

Source: @mhenrixon

Here are some replies:

Source: @GregMolnar

Source: @strzibnyj

๏ธ๐Ÿ“ Kacper Madej asked about using React with Ruby on Rails:

Source: @madejejej

Here are some replies:

Source: @adrienpoly

Source: @geetfun

Source: @ikristoph

Source: @Abe9000000

Source: @ehayes

Source: @geetfun

๐Ÿ“ Christopher Winslett shared about setting up data relationships in Ruby on Rails and Postgres:

Source: @winsletts

๏ธ๐Ÿ“ Kasper Timm Hansen shared a quote from Julian Rubisch newsletter about โ€œTime spent riffling on your domain model or application architecture is time well spentโ€

Source: @kaspth

๏ธ๐Ÿ“ Nate Berkopec shared about being a Ruby performance team:

๏ธ๐Ÿ“ Yaroslav Shmarov shared they upgraded a Rails app from version 5 to Rails 7.2:

Source: @yarotheslav

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

๐Ÿ’ก It was quite a big discussion last week on Hacker News about a submission for this article from AppSignal

๐Ÿ’ก Ryan Bates shared a git tip to amend an earlier commit

๐Ÿ’ก Miguel Michelson shared about using Kamal2 with Hetzner server:

Source: @michelson

๏ธOn the same topic Sam Saffron shared about tests being more reliable:

Source: @samsaffron

And on the same topic Lรกzaro Nixon shared about deploying on Kamal 2 with nobuild:

Source: @lazaronixon

๐Ÿ’ก Brian Casel asked about who is building with Rails and if you want to improve your timeline you can see a lot of people in the replies:

Source: @CasJam

โค๏ธ Why Choose Ruby and Rails

โค๏ธ David Heinemeier Hansson shared about what makes Ruby special:

Source: @dhh

โค๏ธ Viktor Schmidt shared about discovering Ruby and Ruby on Rails:

โค๏ธ Xaden Ryan is reflecting on their return to Ruby after spending a decade working with other languages and is amazed at how extendable RoR is.

โค๏ธ Christopher Winslett emphasises on the RORโ€™s โ€œno-buildโ€ implementation that makes new machine setup a cinch

โค๏ธ Emmanuel Hayford shared

Source: @siaw23

๐Ÿงฐ Gems, Libraries, Tools and Updates

๐Ÿ†• New Gems and Repos

๐Ÿ†• Kamil Nicieja announced the release of lammy - an LLM library for Ruby

Source: @kamil

๐Ÿ†• Paweล‚ Strzaล‚kowski open sourced the repo for RubyEurope

Source: @koddsson

๐Ÿงฐ Updates

๐Ÿงฐ Kevin Newton announced a new version of Release v1.2.0 ยท ruby/prism

Source: @kddnewton

๐Ÿงฐ Brad Gessler announced a new version of sitepress - file-backed website content management

Source: @bradgessler

Source: @lazaronixon

๐Ÿงฐ Donal McBreen announced a new version of Kamal 2 - v2.2.0

Source: @hopsoft

๐Ÿงฐ Alex Rudall announced a new version of Release v7.2.0 ยท alexrudall/ruby-openai

๐Ÿงฐ Svyatoslav Kryukov announced a new version of Upgrade guide for v2.0 | Inertia Rails

๐Ÿงฐ Josef Strzibny announced a new version of Release v2.4.0 ยท strzibny/invoice_printer

Source: @strzibnyj

๐Ÿค Jeffrey Emanuel asks what are the most important things people should keep in mind while interacting with LLM-based systems like ChatGPT

๐Ÿค Mehrdad Farajtabar shared a paper about LLMs and Mathematical Reasoning:

Source: @MFarajtabar (read the thread on Threadreader)

๐Ÿค Travis Hubbard talks about being a senior developer:

๐Ÿค Felix Geisendรถrfer shares a git pro tip:

๐Ÿค Yurii Rashkovskii shared about DRYing table definitions in Postgres:

Source: @yrashk

๐Ÿค Andrew Atkinson shared about being a competent developer:

Source: @andatki

๐Ÿค Nick Schwaderer shared about receiving feedback:

Source: @schwad_rb

More content: ๐Ÿ“š ๐Ÿ—ž ๐ŸŽง ๐ŸŽฅ โœ๐Ÿพ

๐Ÿ“š Sajjad Umar has released his new book "Ruby on Rails for Agile Web Development"

๐Ÿ—ž Newsletters

๐Ÿ—ž Hotwire Weekly published a new edition about Week 41 - Celebrating 1 Year of Hotwire Weekly!

๐Ÿ—ž Ruby On Rails published a new edition about Ruby on Rails - Lazy i18n watcher on boot and more

๐Ÿ—ž Ruby Weekly published a new edition about Ruby 3.4 (preview 2) gets a new parser

๐Ÿ—ž Ruby Libhunt published a new edition about Issue 438 - What's New in Ruby on Rails 8

๐ŸŽง Podcasts

๐ŸŽง Flagrant ยฎ published a new podcast about All Those Letters That You Do | Flagrant

๐ŸŽง Adrian Marin published a new podcast about Cirdes Henrique, Tropical on Rails 2025 organizer. Live from Rails World 2024

๐ŸŽง Ode To Rails Conf published a new podcast about Stephanie Minn

๐ŸŽง Code And The Coding Coders Who Code It published a new podcast about John Nunemaker

๐ŸŽง Indie Rails published a new podcast about IndieRails | Rails World 2024 Crossover

๐ŸŽง The Rails Changelog published a new podcast about The Rails Changelog | 026: Exploring Rails' Default Debugger with Stan Lo

๐ŸŽง Changelog published a new podcast about The Moneyball approach

๐ŸŽง Joshua Wood published a new podcast about FounderQuest | Acquiring Fireside with John Nunemaker

๐ŸŽง Remote Ruby published a new podcast about Rails World and SellRepo

๐ŸŽง The Ruby on Rails Podcast published a new podcast about Episode 525: Catching Up With Ruby Central with Marty Haught

๐ŸŽง The Bike Shed published a new podcast about 443: Rails World and Open Source with Stefanni Brasil

๐Ÿ“ฝ๏ธ ๐ŸŽฅ Videos

๐ŸŽฅ Ruby On Rails published the talks from the conference: Rails World 2024

๐ŸŽฅ Chris Oliver published a new video about How To Add Impersonation To Rails Authentication Generator (Example) | GoRails

๐ŸŽฅ Jason Swett published a new video about Giving Cursor Another Try (It's Better Now)

๐ŸŽฅGraceful.Dev published a new video about Inline Rescue

๐ŸŽฅ Sahil Lavingia and Tony Ennis published a new video about Coding with Cursor: Rails vs Next Session 1

๐ŸŽฅ #Posette Conf published a new video about SaaS on Rails on PostgreSQL with Andrew Atkinson

๐ŸŽฅ Jeremy Smith published a new video about Building Liminal (see it on Threadreader)

โœ๐Ÿพ Articles

Whatโ€™s new ๐Ÿ†•

๐Ÿ†•Jon Sully published an article about How CDNs Work (Propshaft / Static Assets Pt. 2)

๐Ÿ†• Stanislav Katkov published a new article about Battling N+1 queries in Rails

๐Ÿ†• Damilola Olatunji published an article about published an article about Whatโ€™s New in Ruby on Rails 8

๐Ÿ†• Greg Navis published a new article about Rails on OpenBSD: Motivation and Architecture

๐Ÿ†• Prasanth Chaduvula published an article about Rails 7.1 Supports Multiple Preview Paths For Mailers

๐Ÿ†• David Copeland published an article about A Simple Explanation of Postgres' <code>Timestamp with Time Zone</code>

๐Ÿ†• Greg Molnar published an article about Upgrading to Kamal 2

๐Ÿ†• Jeffery Morhous published an article about How Solid Queue works under the hood

๐Ÿ†• Philippe Creux published an article about Building a Robust Data Synchronization Framework with Rails

๐Ÿ†• Akshay Khot published an article about Not-Null Shortcut in Rails 8 Migration Generator

How-TOs ๐Ÿ“

๐Ÿ“ Tejas Bubane published an article about Redis pipelines to the rescue

๐Ÿ“ Rails Designer published an article about Smooth Transitions with Turbo Streams | Rails Designer

Ben Dicken published a new article about B-trees and database indexes

Scott Chacon published a new article about Why GitHub Actually Won

Reply

or to participate.