Short Ruby Newsletter - edition 117

The one where 1Password joins The Rails Foundation and where Dave Thomas solves Advent of Code with Ruby

In partnership with

Table of Contents

(ad 👇)

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

Try today!

🚀 Launches and discounts

🚀 Stanislav Katkov launched the website for https://poshtui.com

Source: @skatkov.com

🚀 Lindsey Christensen launched the Hotwire Essentials

🚀 Sandi Metz announced a 40% discount for their books until 13 December:

Source: @sandimetz

🚀 Martin Sojka announced Search users as you type in Rails with htmx - Code snip by Martin Sojka - CodeSnips

Source: @msojka

🚀 Andrey Eremin launched a new course Ruby on Types: Static Typing with Ruby and Ruby on Rails

📚 Josef Strzibny announced that Test Driving Rails - 1st edition is out:

Source: @strzibnyj

📅 Events

📅 RoRvsWild shared a link to RubyConferences and RubyEurope sharing that Ruby Meetups are back all over the world:

📅 Check RubyConferences.org/meetups as there 26 meetups this week only

📅 Ruby Central invites Ruby meetup organizers to apply for a grant at https://buff.ly/4eYKm1m

📅 Balticruby announced CFP is open at https://papercall.io/balticruby25:

Source: @balticruby

👉 All about Code and Ruby

(ad 👇 )

Learn how to make AI work for you

AI won’t take your job, but a person using AI might. That’s why 1,000,000+ professionals read The Rundown AI – the free newsletter that keeps you updated on the latest AI news and teaches you how to use it in just 5 minutes a day.

Sign up to start learning.

💻 Code Samples

️💻 Drew Bragg shared a code sample about DATA constant:

Source: @drbragg.dev

💻 Xavier Noria shared about Ruby “pipe” operator:

💻 Akash Manohar shared a tip about enabling debugging for Stimulus:

️💻 Prabin Poudel shared a code sample about accessing a helper method:

Source: @coolprobn

💻 Joel Drapper shared a code sample about defining a / method to lookup a record by using a Base36 id

Stephen Margheim added another example:

💻 Jamie Schembri shared a code sample about using StringInquirer from ActiveSupport

️💻 Joël Quenneville shared a code sample showing how converting to UTC changes a time value:

Source: @joelquen

Source: @joelquen

💻 Nate Berkopec shared a code sample about how IO/CPU interact with the GVL:

️💻 Ruby Cademy shared a code sample using the » method:

Source: @RubyCademy

💻 Akash Manohar shared a code sample about:

💻 Benoit Daloze shared a code sample about code golfing Advent of code:

💻 Jeremy Kreutzbender shared a code sample about using Dry::Monads with pattern matching in Rails:

💻Postmodern asked about subclassing the Symbol:

💻 Ismael Celis shared a code sample about event sourcing:

️💻 Ruby Cademy shared a code sample about using block_format from ActionMailer:

Source: @RubyCademy

💻️ Stephan shared a code sample showing how with_index take an argument:

💻 Irina Nazarova shared a code sample about using OpenAI:

💻 Ross Kaffenberger shared a code sample about organizing Tailwind classes:

Source: @rossta.net

💻 Lucian Ghinda shared a code sample about changing a class method in Ruby on Rails without changing the original file:

💻 Ismael Celis shared an SQL code sample about implementing a job queue:

💻 Lucian Ghinda shared a code sample about using Data.define to return multiple values from a method:

📐 Andrzej Krzywda shared a code sample about solving Advent of Code day 3 using parslet gem

💻 Franck Delache shared a code sample about using to_enum to solve Advent of Code:

️💻 Ruby On Rails shared that since Rails 7.1 you can use Rails.env.local? to check for development or test environments:

Source: @rails

️💻 Ruby Cademy shared a code sample about using block_format to clean up poorly formatted text:

Source: @RubyCademy

️💻 Prabin Poudel shared a tip about configuring hosts for working with Stripe in development:

Source: @coolprobn

️💻 Josef Strzibny shared a code sample about loading only specific fixtures:

Source: @strzibnyj

📐 Thinking about Code Design

📐Maciej Mensfeld shared YJIT: Generate specialized code for Symbol for objtostring by xodene · Pull Request #12247 · ruby/ruby

📐 Gregory Brown shared a thread about monkey patching:

️📐 Nate Berkopec shared about RAM usage in Rails:

📐 Stephen Margheim shared a thread about Rails improvements when using SQLite:

📐 Konnor Rogers shared about migrations in Rails not being ordered by timestamp:

📐 Nate Berkopec shared that Ruby 3.2+ will compile YJIT by default if you have rustc installed:

📐 Jamie Birch shared a code sample about:

speakerstand.bsky.social added:

️📐 Rob Zolkos shared about validations:

Source: @robzolkos

David Heinemeier Hansson added:

Source: @dhh

Source: @dhh

📐 Janko Marohnić shared about opening gem source code:

Source: @janko.io

📐 JP Camara shared a thread about for vs each:

📐 Brad Gessler shared a thread about packing a Ruby app into a self-contained binary:

📐 Janko Marohnić shared JSON API · janko/rodauth-rails

️📐 Lucian Ghinda shared a thread about doing test design for an open source piece of Rails code from Zammad:

️📐 Nate Berkopec shared a simple trick to page-load performance:

📐 Stanislav Katkov shared a thread (read it on the Threadreader app or Bluesky) about reading official documentation:

Source: @skatkov.com

️📐 Gavin Morrice shared about object-oriented programming design concepts:

💡Around code (news, findings, books, and more - all about Ruby)

💡 Ruby On Rails announced Ruby on Rails: The Rails Foundation welcomes 1Password as Core member

Source: @rails

Source: @1Password

💡 Chris Oliver shared the new Rails Getting Started guide (getting started preview and install ruby on rails preview)

Source: @excid3.com

💡 Ruby On Rails shared a new PR for review about [RF-DOCS] Update Rails Testing Guide [ci skip] by OughtPuts · Pull Request #53872 · rails/rails

Source: @rails

also shared [RF-DOCS] Asset Pipeline Documentation (Propshaft) [ci-skip] by Ridhwana · Pull Request #53875 · rails/rails · GitHub

Source: @rails

❤️ Why Choose Ruby and Rails

❤️ Adrian Marin shared about Rails:

🧰 Gems, Libraries, Tools and Updates

🆕 New Gems and Repos

🆕 Vladimir Dementyev published a new gem called wasmify-rails - Tools and extensions to pack and run Rails apps on Wasm

🆕 Sam Ruby announced a new gem called fly-atc - A SaaS toolkit for mutli-tenant production deployments with zero-config streaming backups

️🆕 Alex Denisov shared their work on lightstorm: Minimalistic ahead-of-time Ruby compiler

Source: @1101_debian

If you are interested in this you should also read this documentation from the repository: Minimalistic Ruby Compiler

 🧰 Updates

🧰 Rosa Gutiérrez announced version 1.0 of Mission Control Jobs

🧰 Avo for Ruby on Rails announced a new version v3.15.0 - Grid item badge, Summarizable associations, Radio field, and Hack Week

Source: @avohq.io

🧰 Bozhidar Batsov announced an update about Rubocop v1.69.1

🧰 Nate Hopkins announced an update about LocalBus v.0.3.0

🧰 Rosa Gutierrez announced a PR for Rails about SQLite database tasks performed after drop on a single DB don't persist

🧰James announced a new version for  mocha | RubyGems.org | your community gem host

🤝 ️Jason Swett shared about inheritance:

Source: @JasonSwett

🤝 Avdi Grimm shared about DRY:

Source: @avdi.codes

🤝 Stephen Margheim shared a thread about estimations:

🤝 Jason Swett shared about why choose to create an object:

Source: @JasonSwett

🤝 Chris Heilmann shared a tip about checking in JS if the user wants animations or not:

Source: @codepo8

More content: 📚 🗞 🎧 🎥 ✍🏾

Ruby On Rails announced that Ruby on Rails — The Rails Foundation welcomes 1Password as Core member

🗞 Newsletters

🗞 Ruby Weekly published a new article about Making Ruby faster with more Ruby and less C

🗞 Hotwire Weekly published a new edition about Week 49 - Hotwire Essentials tutorial, Solid Cable in Production, and more!

🗞 Ruby On Rails published a new edition about SQLite3 extensions loading and more

🗞 Awesome Ruby Newsletter published a new article about 💎 Issue 446 - Speeding up Ruby by rewriting C in Ruby

🎧 Podcasts

🎧 Drew Bragg published a new episode of Code And The Coding Coders Who Code It about Episode 43 - Stan Lo 

🎧 Jason Swett published a new episode about 240 - JP Camara, Principal Software Engineer at Wealthbox

🎧 Wes Oudshoorn shared a podcast about Wes Oudshoorn - AppSignal's Stroopwafel Adventures 🇳🇱 Sprinkled with Community Love!

🎧 Thoughtbot published a new podcast about The Bike Shed: 449: Evergreen skills for new-ish developers

📽️ 🎥 Videos

🎥 Yaroslav Shmarov published a new video about AVO Internal tool. Authentication, Invitations, Roles, | SupeRails

🎥 Irina Nazarova shared a video about Lightning Talk: From Server to Client: Ruby on Rails on WebAssembly - Vladimir Dementyev

🎥 Jared Norman shared their live streaming on Twitch solving Advent of code 

🎥 Thành Đỗ published an YouTube series about Kamal Tutorial 

🎥 Thoughtbot published a new video about Recorded training: Setting up a local LLM and replacing Open AI

🎥 Dave Thomas published a series of videos solving Advent of Code with Ruby: 2024 Advent of Code, Day 1, 2024 Advent of Code, Day 2, 2024 Advent of Code, Day 3

🎥 Kaleb Lape published a new video about Rails Hotwire Deep Dive: Mastering Scroll Position with Turbo

✍🏾 Articles

What’s new 🆕

Ruby Central published an article about Ruby Central’s Infrastructure Improvements for RubyGems.org

Miles Woodroffe published an article about Solid Cable in Production with Kamal

Ross Kaffenberger published an article about Joy of Rails | What you need to know about SQLite

JP Camara published an article about Speeding up Ruby by rewriting C… in Ruby and about My MacOS setup for hacking on CRuby

Alan Ridlehoover published an article about Hexagonal Architecture + Rails

Jeremy Kreutzbender published an article about Adding Google OAuth in Rails 8

Jared Norman published an article about Advent of Criminally Bad Ruby Code

Ender Ahmet Yurt published an article about Problems with If Clauses

Jochen Lillich published an article about A rocky but encouraging start with Rails credentials

Lucian Ghinda published a new article about Overriding Methods in Ruby on Rails: A No-Code-Editing Approach, about Applied test case design: Zammad example and about How to Return Multiple Values from a Method in Ruby Using Data.define

Gregory Brown published an article about Archean : 0x03] Reification

Nate Berkopec published a new article about 3 ActiveRecord Mistakes That Slow Down Rails Apps: Count, Where and Present

Josef Strzibny published a new article about Test Driving Rails, 1st edition is released!

Ben Sheldon published an article about Including Rails View Helpers is a concern

Daniela Baron published an article about Fixing Gem Install Errors on M3 Mac with Ruby 2.7

Mintbit published a new article about Exploring Ruby's Programming Paradigms - Mintbit

Brad Gessler published a new article about Multi-Gem Monorepos: Versioning, Namespacing & Zeitwerk

Rails Designer published an article about Advanced Stimulus: Custom Action Options and about Why Disconnect in Stimulus Controllers

Chetan Mittal published an article about Mastering Concerns in Ruby on Rails: A Comprehensive Guide to Modular Code Organization, Security, and Best Practices

Jonathan Rochkind published an article about Accessing capybara-screenshot artifacts on Github CI

Dmitry Pogrebnoy published an article about Mastering Ruby Debugging: From puts to Professional Tools

Joey Wang published a new article about Crafting Elegant Ruby: Balancing Readability and Performance

Tonyyunker published a new article about Case Regex Matching with Capture Groups

How-TOs 📝

Avo published an article about How to add an RSS feed to a Rails app

Thoughtbot published a new article about Hotwire Essentials is here: Learn Hotwire by building a podcast player

Benjamin Curtis published an article about How to serve secure custom domains with Caddy

Sulman Baig published an article about Implementing Multi-Select Enums in Ruby on Rails with PostgreSQL

Scott Watermasysk published an article about Mise and Puma-Dev

William Kennedy published a new article about Up and Running with Hotwire Native iOS 4 - Custom iOS Keyboard

Maciej Litwiniuk published a new article about Nested forms with just Turbo Streams

Rachel Andrew published an article about  What do the State of CSS and HTML surveys tell us?

All issues