- Short Ruby Newsletter
- Posts
- ๐ Short Ruby News - Edition #43
๐ Short Ruby News - Edition #43
Discover the world of Ruby in this comprehensive newsletter covering week 20 of 2023. Find code samples, community updates, gems, resources, and thought-provoking discussions.
You can jump directly to a section:
๐ Our Community

The newsletter is now back to one single email sent. Read here more about this decision. TLDR: both the poll results and the stats from the newsletter show that the two newsletter format was not working correctly, while the majority prefers one email. Thus this edition contains the More Content section inside this edition as before. I will continue to publish the expanded content edition only on the web.
All images are clickable. You can click on the image if you want to read the original source (article, tweet, videoโฆ).
๐ธ For only $1.5 per week (just $6.5 a month), you can become a paid subscriber and contribute to the success of the flourishing Ruby community we all adore!
๐ Our Community
๐ Friendly.Rb announced a new speaker, see friendlyrb.com for more details

๐ Dave Copeland shared reasons why Rails and Ruby are great:

And here are what other people added:


๐ Ruby For Good announced that registrations are open for the event in July at rubyforgood.org/events

๐ Ian announced an update for the alterisian.github.io/helloworld website:

๐ Dave Paola shared feedback from a recent applicant:

Here are some of the replies:





There are many replies to Dave's tweet that I recommend you read.
๐ On the same topic, Gomez shared about how they use Ruby on Rails at PlanetScale:

๐ All about Code and Ruby
๐ wiki.nikiv.dev/programming-languages/ruby is an extensive wiki created by Nikita with many resources for learning or deep diving into Ruby. Here is a screenshot with just a tiny part of all the resources:

There is a similar wiki about Rails maintained by the same author.
๐ Noah Gibbs shared about code and the choices we have to make between them.

This triggered a lot of replies. Please read them directly, as there is a good but healthy debate.
Here are just some of the replies in a random order. This seems to me a sensible topic for our community, so please read the other replies for context:






Other links mentioned in the replies: GoodCop and Relaxed Ruby Style.
๐ Paul Mucur shared a TIL about create_or_find_by:

๐ Ben Sheldon (He/Him) shared two learning points about Regexp and a code sample showing Ruby 3.2 Regexp timeout:

๐Benoit shared a code sample showing how to display PSQL style tables in Rails console. Check the gist at PSQL table in Rails console

๐ Brandon Weaver asked a question about reducing the processing of requests for assets by Webmock with VCR:

Olivier Lacan replied with the link to Ignore Request for VCR. You might also want to read the analysis Brandon Weaver added in this issue opened on webmock gem: Performance of `WebMock::Util::Headers.normalize_headers` ยท Issue #1027
๐Kay Rhodes shared a tip about how to fix a MySQL gem error:

๐ Takashi Kokubun shared what the current purpose of RJIT is:

๐ Prabin Poudel shared about deployment options:

Among the replies:
๐ Ruby Cademy shared a code sample showing how to use Object#tap (that Ruby 3.2 seems to be defined at Kernel#tap vs in Ruby 2.7 being at Object#tap):

๐Alexandre Ruban asked a question about SRP on an Active Model has over 70 attributes:

Matt Swanson replied with:

๐ Brad Gessler shared a code sample showing a form builder:

๐ Adrian Marin asked a question about integration StimulusReflex with Hotwire:

Marco Roth clarified this:


๐ Xavier Noria shared a code sample about the break keyword used in loops:

๐ Josef Strzibny shared a thread with gems recommendations:

Here are the recommended gems:
vessel - โhigh-level web crawling frameworkโ
mapkick - โCreate beautiful JavaScript maps with one line of Ruby. No more fighting with mapping librariesโ
simple_calendar - โSimple Calendar is designed to do one thing well: render a calendarโ
business_time - business hours math
heya - โHeya is a campaign mailer for Rails. Think of it like ActionMailer, but for timed email sequences. It can also perform other actions like sending a text messageโ
noticed - โNotifications for your Ruby on Rails appโ
chartkick - โCreate beautiful JavaScript charts with one line of Rubyโ
blind_index - โSecurely search encrypted database fieldsโ
split - โSplit is a rack based A/B testing framework designed to work with Rails, Sinatra or any other rack based appโ
store_attribute - โActiveRecord extension which adds typecasting to store accessorsโ
logidze - โLogidze provides tools for logging DB records changes when using PostgreSQLโ
discard - โSoft deletes for ActiveRecord done rightโ
counter_culture - โTurbo-charged counter caches for your Rails appโ
pretender - โAs an admin, there are times you want to see exactly what another user seesโ
secure_headers - โThe gem will automatically apply several headers that are related to securityโ
ahoy - โSimple, powerful, first-party analytics for Railsโ
blazer - โExplore your data with SQL. Easily create charts and dashboards, and share them with your teamโ
i18n-tasks - โi18n-tasks helps you find and manage missing and unused translationsโ
instant18n - โUse OpenAI's GPT large-language model to power internationalization of the text in your Rails applicationโ
jsonb_accessor - โAdds typed jsonb backed fields as first class citizens to your ActiveRecord modelsโ
invoice_printer - โSuper simple PDF invoicing. InvoicePrinter is a server, command line program and pure Ruby library to generate PDF invoices in no time. You can use Ruby or JSON as the invoice representation to build the final PDFโ
๐ Brad Gessler shared a thread about batch resource manipulation. Here are the first two tweets from the thread:



๐Colleen Schnettler asked for recommendations of Rails CMS:

Here are some of the recommendations:
Sitepress (Ruby)
Bridgetown (Ruby)
Avo (Ruby)
AlchemyCMS (Ruby)
Middleman (Ruby) - check out also this repo for Middleman 4 + Tailwind CSS
Jekyll (Ruby)
SpinalCMS (Ruby)
๐ Ruby Cademy shared a code sample about using Rails ActiveSupport::CurrentAttributes

๐ Xavier Noria shared a thread about โreloadingโ naming:

He explain further about what happens in Ruby:
That indeed happens if you have reloading and eager loading enabled, a possible but rare combination.
In the app lazy loads, "reloading" only "unloads", really. That is the nuance. Unloaded classes are not loaded again during that operation.
You'll load what you use, on demand.
"Unloading" is also an abuse of language: Ruby has no way to unload code.
"Unloading" means `remove_const` autoloaded constants.
However, if the app is correct, the objects they stored will become unreachable and eventually GCed.
So, in that sense, this one is good enough.
๐ค I imagine that if you have read this so far, you find value in this newsletter.
This is a free publication that relies on the support of its readers:
๐งฐ Gems, Libraries, and Updates

๐งฐ Dima Fatko announced a new gem pluck_in_batches: A faster alternative to the custom use of `in_batches` with `pluck`

๐งฐ Nick Schwaderer announced a new gem chat_gpt_error_handler:


๐งฐ Mike Dalessio announced the release of version 1.15.0 of nokogiri Read the release notes

๐งฐ Mike Dalessio announced the release of version 1.6.3 of the sqlite3-ruby gem Read the release notes
๐งฐ Paweล Urbanek published a new gem rails-brotli-cache: Rails cache using Brotli algorithm offers better compression and performance

๐งฐ Yuta Saito announced they release version 2.0.0 of ruby.wasm Read release notes

๐งฐ Ivo Herweijer published a new benchmark for Roda that now includes Ruby 3.3 preview1:

๐งฐ Atsushi Tatsuma published a new gem llama_cpp - provides Ruby bindings for the llama.cpp

Please consider becoming a paid subscriber to support this newsletter for just $1.5/week ($6.5/month). 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
๐ค Related (but not Ruby-specific)

๐ค Nate Berkopec shared a reminder to check resources if they are over provisioned:

๐ค Chris Wanstrath shared a thread about the early days of Github and keeping it profitable:

More content: ๐ ๐ ๐ง ๐ฅ โ๐พ
In case you want to read the More Content version with articles previews read it on web here
๐ Books
๐ Noel Rappin announced that Programming Ruby 3.2 (5th Edition) is now draft-complete
๐ Newsletters
๐๏ธ Ruby Weekly published a new edition: Ruby 3.3 makes its first appearance
๐Vipul A M published a new edition of This Week in Rails about Rails World CFP, ActiveRecord.disconnect_all!, optimized where query and more!
๐ Greg Molnar published a new edition of Rails Tricks about Shared examples with Minitest - Rails Tricks Issue 7
๐๏ธ Ruby Libhunt published a new edition of Awesome Ruby Newsletter - Issue 365
๐๏ธ Ruby Radar published a new edition about Spilling Beans
๐ง Podcasts
๐งRooftop Ruby published a new episode about 13: Open Source and More With Marco Roth
๐งCode And The Coding Coders Who Code It published a new episode about Episode 21 - Nick Schwaderer
๐ง Indie Rails published a new episode about Pascal Lalibertรฉ - 6 things to avoid as a freelancer
๐ง Remote Ruby published a new episode about Railsconf Recap | Remote Ruby | Episode 229
๐ง Ruby Rogues published an episode with Brad Gessler about Building Rails Application with Phlex
๐ฝ๏ธ ๐ฅ Videos
Talks
๐ฝ๏ธ Yaroslav Shmarov published their first episode of SupeChat Amanda Perino from Rails Foundation about Rails World
๐ฝ๏ธ The Rubber Duck Dev Show published a new episode about Leveling Up For Juniors With CodeWithJulie
Screencasts
๐ฅ Yaroslav Shmarov published a new episode about Rails 7 #133 API Pagination with Pagy
๐ฅ Dave Kimura published a new episode about Tokenized Search
๐ฅ Deanin published new episodes about:
โ๐พ Articles
Whatโs new
Samuel Williams shared their slides from Ruby Conf AU: Asynchronous Rails
Big Binary published an article about Rails 7.1 adds ActiveRecord::Base::normalizes. On the same topic Sampat Badhe also published an article about Rails 7.1 AR adds normalizes API for attribute values
Shivam Singh Chahar published an article about Rails 7.1 adds support for responsive images.
How-Tos
Maurรญcio Maia published an article How-To Add Recommendations to a Rails App with pgvector and OpenAI
Aestimo Kirina published an article about Manage Your Ruby Logs Like a Pro
Akshay Khot published an article about How to Create Custom Flash Types in Rails
Adam Rice published an article about Debugging with introspection
Takashi Kokubun published an article about their talk at RubyKaigi about [JP] Announced how to write a JIT compiler on RubyKaigi (English version translated with Google)
Ariel Juodziukynas published an article about Handling Environment Variables in Ruby
Deep Dives
Unathi Chonco published an article about Ruby Method Lookup Demystified: Inheritance, Mixins, and Super
Paweล Dฤ browski published an article about Unraveling the mystery of the super keyword
Related
Adam Rice published an article about Why you shouldn't exclusively hire senior developers
Dave Copeland shared an article about My 20 Year Career is Technical Debt or Deprecated
Paweล Dฤ browski published an article about Understanding database Indexes in PostgreSQL
Jeremy Smith shared an repository about prompt-engineering: Tips and tricks for working with Large Language Models like OpenAI's GPT-4
Lucas Barret published an article about Postgres concurrency what could go wrong (part 1)
Please consider becoming a paid subscriber to support this newsletter for just $1.5/week ($6.5/month). 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
Reply