

Discover more from Short Ruby Newsletter
Short Ruby News - Edition #66
Discover the world of Ruby in this comprehensive newsletter covering week 44 of 2023. Find code samples, community updates, gems, resources, and thought-provoking discussions.
Consider becoming a paid subscriber to support this newsletter for just $1.8/week ($7.5/month), and you will receive an ad-free version. Your contribution aids growth and maintains the quality of ShortRuby for everybody
You can jump directly to a section:
๐ New Products & ๐ Events
๐ย All about Code and Ruby
๐งฐย Gems, Libraries, and Updates
๐ค Related (but not Ruby-specific)
More content: ๐ ๐ ๐ง ๐ฅ โ๐พ (articles, podcasts, videos, newsletters)
๐ New Products
๐ย ย Kevin Newtonย launchedย the documentation website for ruby.github.io/prism

๐ย Colleen Schnettlerย announced the launch ofย Get Podcast Leads

๐ย Chris Oliverย announced the launch of a new learning path:ย The Ruby on Rails Learning Path
๐ Andrei Bondarevย invited us to fill in theย Ruby AI Survey 2023. I think it will be great to see where we are and what we use for Ruby AI:

๐ Events
๐ ย Friendly.Rbย sharedย the conferenceโs after-movie Friendly.rb 2023 - Bucharest and also announced that tickets are on sale for next year's edition on September 18-19, 2024, in Bucharest โ Tickets


๐ Helvetic Rubyย announced the early-bird tickets are done but if you want to participate there is still time to buy the normal price tickets at helvetic-ruby.ch

๐ Simmon Liย announcedย Toronto Ruby: Refreshed for the 3.0 era


๐ ย Honeypotย announced the release of the Ruby on Rails documentary and Live Q&A. Register here for Q&A link

๐ All about Code and Ruby
๐ย Jorge Manrubiaย sharedย a diff showing some Turbo 8 code:

๐ย Emmanuel Hayfordย sharedย about dom_id donโt need an instantiated object:
๐ Stephenย sharedย a code sample from the new project they are working on:

๐ย David Heinemeier Hanssonย shared thatย 37signals website has no build step for CSS:
๐Postmodernย asked and proposed a solution about defining static data in sub-class that the super-class will access:


๐ย Stephen Margheimย sharedย a code sample of a custom query builder:

๐ Andy Crollย asked about approaches to test turbo responses working alongside their regular responses:

Here are some replies:



๐ Postmodernย sharedย about IPAddr object supporting include

๐ย Ahmed Nadarย shared a tip about renaming to avoid conflicts:

๐ย Xavier Noriaย asked about approaches for handling SQLite in production in Rails:
There is a great conversation going on there that I cannot include here as it will be long screenshots :) You should read all replies (or onย nitter) as it is an example of a productive conversation in social media.
๐ย Yuta Saitoย shared the grant results forย 2023 Ruby Association Grant

All the selected applications seems very interesting. I specially like the idea of a Ruby Playground:
Support ShortRuby by subscribing for only $7.5/month ($1.8/week).
Get an ad-free experience and help us maintain our quality for everyone.
๐ Kuba Suderย sharedย an example of a commit description about fixing an SQLite lock issue:

๐ Paweล Swiฤ tkowskiย sharedย a code sample about encrypting attributes when using ROM:

๐ย Jason Swettย shared that using words like โhandleโ or โmanageโ to name functions or classes is a code smell:

๐ย Bhumiย shared a code sample about Module prepand:

๐ย Amree Zaidย sharedย a code sample showing how to install a specific version of Rails:

๐ย Naofumi Kagami ๅ ใ ็พ็ดๅฒย sharedย about why they consider Rails special:
๐ย Jean Boussierย sharedย a funny code sample:
๐ย Errol Schmidtย sharedย about the size of downloads of Mail gem and that might hint how much impact Rails had in the world:

๐ย Andreas C.ย sharedย a big list of Kamal commands cheatsheet โ Simple list of kamal commands
๐ย Nate Hopkinsย sharedย about using look-ahead Regular expressions in Neovim to search/replace Ruby constant names:
๐ย Evgeniy Deminย sharedย a great example of how helpful Ruby community can be. I invite you to read Source:ย the conversation in the original threadย (or read onย nitter) to see an example of a friendly and helpful contribution from Xavier and Robert:

๐ย Nate Berkopecย sharedย about where the focus of improving latency should be in a Rails app:

๐ย Bhumiย sharedย about Active Support concerns works:

๐ Joel Mossย sharedย a hypothetical code for reactive components in Ruby:
Andrew Cetinicย shared as a reply a code sampleย using Turbo - see the repo at Turbo Component

๐ย Andreas C.ย sharedย a code sample showing how to add a silencer for /up route:
๐ Noel Rappinย sharedย an update aboutย Programming Ruby 3.2 (5th Edition) - Pragmatic Programmers link and for pre-order printed version Amazon link

๐ย Salomรณn Charabatiย sharedย about connecting from a different DB from Rails:

Andrei Maximย replied with a code sample:

๐ย Nate Hopkinsย sharedย about using a GPT plugin for Neovim:
๐ย Greg Navisย asked about reasons why people think Rails is a good choice for startups. There are some good repliesย (read them onย nitter) if you want to use them to pitch Rails:
๐ u/aeum3893 asked about becoming a senior Rails developer and there are some good answers there:

๐ย Nicolรฒย shared about the preference for using if !
instead of unless
There are quite a lot of replies:



๐ย Marian Posฤceanuย sharedย a tip about deploying to ARM64 from Apple Sillicon:
Please consider becoming a paid subscriber to support this newsletter for just $1.8/week ($7.5/month), and you will receive an ad-free version. Your contribution aids growth and maintains the quality of ShortRuby for everybody
๐งฐ Gems, Libraries, Tools and Updates
๐งฐ Tim Rileyย announced the release ofย ย Hanami 2.1.0.rc1

๐งฐ The J Ruby Teamย announced the release ofย ย JRuby 9.4.5.0 Released

๐งฐ Mike Perhamย sharedย a new feature being merged to Ruby about Feature #10602: Support multithreaded profiling - Ruby master

๐งฐย Avoย announced a new release for Avo 2 and Avo 3 - read Avo Admin for Rails - Release changelog

๐ ๐งฐ Matt Brictson release a new version of nextgen - Generate your next Rails app interactively!
๐ ๐งฐ Sven Schwynย announced a new gem dry-credentials: A mixin to use encrypted credentials in your classes

๐ ๐งฐย Landon Grayย announced a new repo calledย Ruby-ReAct-Agent - An implementation of the ReAct approach to give LLMs access to external tools in ruby
๐ ๐งฐย Ateล Gรถral announced a new gemย event_stream_parser: A lightweight, fully spec-compliant parser for the event stream format
๐ ๐งฐย David Backeusย announced a new gemย actioncable-enhanced-postgresql-adapter: An enhanced ActionCable adapter for PostgreSQL
๐ ๐งฐ Carl Mercier announced a new gem ultimate_turbo_modal - The ultimate Turbo / Stimulus / Hotwire modal window for Rails
๐งฐ Mike Dalessioย announced a new releaseย ย Release 1.6.8 / 2023-11-01 ยท sparklemotion/sqlite3-ruby

๐งฐย Kevin Newtonย announced a new release forย Release v0.16.0 ยท ruby/prism

๐งฐย Jean Boussierย announced a merged PR to Ruby aboiutย Make String.new size pools aware. by casperisfine ยท Pull Request #8825 ยท ruby/ruby
๐งฐย Greg Molnarย announced a new release forย textacular: Textacular exposes full text search capabilities from PostgreSQL, and allows you to declare full text indexes
๐งฐย Dr Nic Williamsย announced a new version for searchcraft - Instant Search for Rails and ActiveRecord using SQL materialized views
๐งฐย Yuichiro Kanekoย announced new versions for ruby/raccย Release v1.7.2 ยท ruby/racc and Release v.1.7.3
๐งฐย Jeremy Evansย sharedย a new release for Sequel 5.74.0 Released ยท jeremyevans sequel ยท Discussion #2090
๐งฐย Stefanni Brasilย announced a new releaseย for Release v3.2.2 ยท faker-ruby/faker
๐ค Related (but not Ruby-specific)
๐คย Xavier Noriaย sharedย about what does it mean to finish a task:
๐คย ย Joe Masilottiย sharedย about using ChatGPT as a co-worker:

๐คย Naofumi Kagamiย sharedย about the difference between a library and a framework:
๐คย Flavioย sharedย about using input field to take a picture, video or record your voice on mobile:

๐คย Kent Beckย started a discussion about TDD:
๐คย Kent Beckย also proposed the idea to remove code reviews:
๐คย Andy Huntย sharedย also about code reviews proposing a name change:
ย ๐คย Chris Wanstrathย sharedย a thread about a moment when they deleted the production DB at Github:
๐คย Nate Hopkinsย sharedย about impact being different than busy:
๐คย Jorge Manrubiaย sharedย about developer happiness:

More content: ๐ ๐ ๐ง ๐ฅ โ๐พ
๐ Newsletters
๐ Zzakย published a new edition of This Week in Rails about "Insert...Returning" For Maria Db, "Set Constraints" For Postgre SQL, "Deferrable" Foreign Keys For SQLite And Much More!
๐ Ruby Weeklyย published a new edition aboutย Ruby Weekly Issue 676: Pattern matching: 'A big feature, after all
๐ Sara Jacksonย published a new edition aboutย ย This Week in Open Source (October 13, 2023)
๐ Awesome Ruby Newsletterย published a new edition aboutย Issue 389 - Deploying Rails on a single server with Kamal
๐ Matheus Richard published a new edition about This week in #dev (Oct 20, 2023)
๐ย Hotwire Weeklyย published a new edition aboutย Week 44 - The Anatomy of Turbo Streams, Strada with Turbo Navigator, and more
๐ Ruby Radar published a new edition aboutย Happy November!
๐ Harrison Broadbent published a new edition aboutย The Rails Notes Newsletter Issue #17
๐ง Podcasts
๐ง Adrian and Yaroslav published a new episode aboutย E7 October Summary, Brovember Plans
๐งย Jason Swettย published a new podcast aboutย 201 - Remote Ruby Co-Host and Sin City Ruby 2024 Speaker Jason Charnes
๐งย Indie Railsย published a new podcast aboutย IndieRails | Bram Jetten - Building Spina & PlanGo
๐งย Remote Ruby published a new episode about Live At Rails World 2023
๐ง Ruby for All published a new episode aboutย The Art Of Conference Speaking With Kevin Murphy
๐งย Lucas Barretย published a new podcast aboutย GemRuby Show: Mohammed A. Ali, LiteStack
๐ง The Ruby on Rails Podcastย published a new episode aboutย The Ruby On Rails Podcast Episode 494: Rails World Live! Pt 2 With Nick Schwaderer And Rafael Franรงa
๐ง Matt Swanson published a new episode fromย Yagni | Friday Deploys W/ Charity Majors
๐งย The Rails Changelogย published a new podcast aboutย #14 Talking PostgreSQL with Andrew Atkinson
๐๏ธ Talks, Slides and Conference Talks
๐๏ธย Montreal.rb published the video fromย Ruby Talk 2023/10 Elevate Your Ro R Views With View Component & Lookbook Parham Ashraf
๐๏ธ Anubhav Jain published the video fromย Bengaluru Ruby Users Meetup Nov 2023
๐๏ธย Kaigi On Railsย published the videos from Kaigi on Rails on YouTube atย Kaigi on Rails 2023 (JP)
๐ย Andrey Novikovย shared their slides from KaigiOnRails aboutย Rails Executor
๐ฝ๏ธ ๐ฅ Videos
Screencasts
๐ฅย GoRails published a new video series about HTML for Beginners
๐ฅย Yaroslav Shmarovย published a new video about ย Rails #148 Data Tables Without Page Refresh Using Hotwire Turbo Frames
๐ฅย Dean DeHart published a series of videos:
๐ฅ Drifting Rubyย published a new video aboutย Episode 426 - readonly?
๐ฅย Thoughtbotย published a new video aboutย Rails Development LIVE
๐ฅย Tim Morganย published a new video aboutย Natalie Update: Nov 2023 | Ruby | Compilers
โ๐พ Articles
Whatโs new ๐
Brad Gesslerย published an article aboutย SQLite Persistence Canaryย โ โAs the world boldly moves towards running SQLite in production, thereโs a bit of a problem that looms in todayโs container-based production environments: persistenceโ
Iย published an article aboutย Zammad Ruby On Rails Open Sourceย โ โZammad is an open-source ticketing system, that also offers an on-cloud productโ
Matt Muller at AWS published an article aboutย Announcing The End Of Support For Ruby Runtimes 2.3 And 2.4 for The Aws SDK For Rubyย โ โStarting November 24, 2023, AWS SDK for Ruby version 3 will no longer support these end of life (EOL) Ruby runtime versions: Ruby 2.3 and Ruby 2.4โ
Brooke Kuhlmannย published an article aboutย Connascenceย โ โYou canโt eradicate coupling entirely but there are multiple ways to significantly reduce the burden. This is why knowing what connascence is and how to reduce it helps produce a robust architecture. This article will give you the vocabulary for deeper thoughtโ
Radan Skoricย published an article aboutย Experiment: Fully Adding Sorbet And Rbs To A Small Projectย โ โI used statically typed languages and liked the extra safety but I also really like Ruby for how elegant it is and the freedom it gives me. Will I regret adopting types?โ
Vishnu M published an article aboutย Rails 7.1 Comes With An Optimized Default SQLite3 Adapter Connection Configuration โ โThe default SQLite3 Active Record adapter connection configuration has been updated in Rails 7.1 to better tune it to work for modern Rails applicationsโ
Roy Tomeij published an article aboutย Sponsoring Rails World: What Did It Cost, And Was It Worth It?ย โ โMany individuals, particularly founders of other SaaS platforms built on Rails, have inquired about the cost of our Rails World 2023 sponsorship and its worth. While anyone can estimate our expenses based on publicly available data, we're happy to provide a detailed breakdownโ
Sam Ruby published an article about Audience Of One โ โThis blog post will show you how to build a Rails application that streams fly logs output to the browserโ
Donn Felker published a new article aboutย Native Where You Need It (Hybrid Mobile Apps) โ โNWYNI refers to the practice of using native mobile components only in areas of your app where theyโre essential and optimal. In all other instances, web components (web views) are utilized. AKA: Hybrid Mobile Apps. Part of the app is web, and maybe, parts of it are native mobile, when neededโ
Garrit Frankeย published an article aboutย Tracking Sq Lite Database Changes In Gitย โ โIf you want to track changes and updates to a database using Git, you won't be able to see full diffs by default (โฆ) So, is there a way around that? Turns out: there is!โ
Dhaval Singh published a new article aboutย Concurrency 101: Getting It Right Using Amdahl's Law โ โSome things are always inherently vague, like figuring out the exact amount of salt to put in a dish without a recipe. Setting the concurrency of your app might feel the same way!โ
Ahmed Nadar published a new article aboutย A Ruby Serenade for 99 Bottles of Beer โ โToday's session isn't about vocal ranges or hitting the perfect pitch, although I'm sure you have a lovely voice and I'd not stop your karaoke party. Instead, we're diving into a melody that echoes through the halls of coding exercises: "99 Bottles of Beer.โ
Deep Dives ๐
Victor Shepelevย continued their series about new Ruby features and published an article aboutย โUseless Ruby Sugarโ: Pattern Matching (Pt. 3/3)ย โ โIn two previous parts, we looked into Rubyโs pattern matching, introduced through a few recent language versions. We discussed how it was implemented and what problems and possibilities it brought to the language syntax and semantics. Now, letโs put it all into a broader contextโ
Julian Rubisch published an article aboutย A Deep Dive Into Lite DB For Ruby On Railsย โ โIn the second post of our series covering LiteStack (an alternative way to build Rails applications entirely based on SQLite), we'll explore the database's concepts of flexible typing and type affinityโ
Dhaval Singh published a new article aboutย Understanding Rails Callbacks & Common Pitfalls โ โWhy you should be careful when using Callbacks in Rails and their hidden gotchasโ
Steve Polito published a new article aboutย Are you absolutely sure you know how to use the button element? โ โafter working on a payment form for a client project, I realized that the <button> element is a robust, versatile and under utilized tool. Plus, knowing how to leverage forms and buttons will benefit you when using Turbo and Stimulusโ
Cherry Ramatis published an article aboutย Metaprogramming In Rubyย โ โThis magic is on purpose and a quite special feature of ruby called metaprogramming, in this article we'll see more about the deep nested details of ruby and how to create magic APIs with metaprogramming!โ
Peter Zhu published a new article aboutย Rubyist's Walk Along the C-side (Part 11): Debugging โ โIn this article, weโll look at the various ways to deal with the inevitable scenario: our C extension crashesโ
How-Tos ๐
Matt Brictsonย published an article aboutย Simplify Your Capybaraย Selectorsย โ โHow to use a Ruby-friendly syntax alternative to esoteric CSS and xpath expressions. Plus, a trick for making Capybara automatically aware of data-testid attributesโ
Cezary Kลos published a new article aboutย GraphQL in Ruby on Rails: How to Extend Connections โ โTo enable pagination, GraphQL utilizes a cursor-based system known as Connections. The specification states that each of the above can be extended with additional fields as the schema designer deems necessary. If you're interested in learning how to do this, continue readingโ
Jared Norman published an article about Rails Domain Redirects โ โIs your Rails app available at multiple domains, but you only want to serve requests from one of them? Here's how to handle that at the app levelโ
Arun Dhir published a new article aboutย Simplify Data Filtering in Ruby on Rails with Ransack โ โOne of the common tasks in web applications is filtering and searching through data. This can be complex and time-consuming to implement from scratch, but luckily, thereโs a fantastic gem called Ransack that simplifies this processโ
Prasanth Chaduvula published an article aboutย Rails 7.1 Introduces Active Record/Base/Normalizationย โ โUsing ActiveRecord::Base::Normalization we can specify unique normalization rules for model attributes. When an attribute is assigned or changed, normalization is applied, and the normalised value is stored in the databaseโ
Alkesh Ghorpadeย published an article aboutย Rails 7.1 Adds Support For Infinite Ranges For Length Validatorsย โ โRails 7.1 adds support for infinite ranges for LengthValidators. You can pass an infinite range to the in and within options of the LengthValidatorsโ and aboutย Rails 7.1 Expands Its Support For Active Record Asynchronous Queries
Harrison Broadbentย published an article aboutย Rails Generate Mailer (Quick Breakdown)ย โ โThis is a short and sweet article covering rails generate mailer, the Rails generator for ActionMailer, plus all it's options. I cover it's basic usage to generate an ActionMailer mailer with some mailer methods, then dig into all the flags we can passโ
Daniel Hoelzgen published a new article aboutย Enhancing Video Search & Discovery In A Rails Application By Using Whisper And Chat GPT โ โThe general idea is simple: We transcribe the videos using Whisper, use GPT to generate summaries of its content, and calculate embeddings we can use for search and discoveryโ
Josef Strzibny published a new article aboutย Deploying Rails on a single server with Kamal โ โHereโs one way of a cloud-independent deployment of Rails, Sidekiq, PostgreSQL, and Redis on single virtual server with Kamalโ
kojix2 published an article aboutย Mixing Ffi, Fiddle, And C Extension In Rubyย โ โIf you're working with Ruby and need to invoke a function written in C language, there are some convenient gems available: Ruby-FFI and Fiddleโ
Hernan Velasquezย published an article aboutย Be Careful When Using Assign Attributes With Has One Relations In Rails 7ย โ โRecently I was tasked to solve a bug on a feature that allows a user to mass import the relationships of an existing record of a model via a yml fileโ
Related
Adrian Oprea published a new article aboutย Monolith is the new old fashion
Rachele Di Tullio published a new article aboutย Autocomplete accessibility bookmarklet
Indie Hackers published a new article aboutย Tony Dinh hit $22k in 11 days by decoupling input from output
Please consider becoming a paid subscriber to support this newsletter for just $1.8/week ($7.5/month), and you will receive an ad-free version. Your contribution aids growth and maintains the quality of ShortRuby for everybody:
If you consider upgrading and want more information, please read Why to subscribe to paid.