

Discover more from Short Ruby Newsletter
Short Ruby News - Edition #49
Discover the world of Ruby in this comprehensive newsletter covering week 26 of 2023. Find code samples, community updates, gems, resources, and thought-provoking discussions.
You can jump directly to a section:
๐ Our Community
๐ย All about Code and Ruby
๐งฐย Gems, Libraries, and Updates
๐คย Related (but not Ruby-specific)
More content: ๐ ๐ง ๐ฅ โ๐พ (articles, podcasts, videos, newsletters)
๐ธ 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 while receiving an ad-free version of the newsletter!!
๐ Our Community
๐ Karl Oscar Weberย shared that Camping (โa micro web framework that stays as small as possibleโ) has now passed 800+ stars on Github:

๐ Friendly.Rbย announced a new speakerย Nick Sutterer - Beyond the Service Object

๐ Ruby Confย announced thatย registration is open for RubyConf 2023 (San Diego)

๐ Kaigi On Railsย announced the CFP is now open for Kaigi on Rails 2023

๐ Jason Swettย announced a new speaker for ย Sin City Ruby - Las Vegas Ruby Conference

๐ Rubycentralorgย announcedย Ruby Central Job Board:

๐Visualityย announced the Ruby Warsaw Community Conference

๐ Matt Swansonย announcedย the Boring Rails Chicago Meetup

๐ Nick Schwadererย announced a discord server forย Scarpe (โlibrary that let you build little local desktop computer programs, package them up and give copies to peopleโ) at joinscarpe.schwad.org
๐ All about Code and Ruby
๐ชง Have you considered inviting your company to sponsor this newsletter? If you are using Ruby on Rails, I think your company is a perfect fit :)
You can send the sponsorship packages info to your marketing, HR, or product management teams.
I'm happy to assist you with drafting an email. Send me a message at hello@shortruby.com I'll do my best to draft an email for you to send inside your organization.
๐ Aristรณteles Coutinhoย sharedย a benchmark about freezing strings:

๐ Kay Rhodesย asked about weird behaviour of using sub:

And here is an in-detail explanation of why this is happening, as Jean Tessierย shares it:

๐ Peter Cooperย sharedย a Gist showing how to store embeddings in SQlite โ Using SQLite to store OpenAI vector embeddings from Ruby

๐ Nate Berkopecย sharedย a tip about Sidekiq

, and here is a reply from Steven Harmanย about how they organize their job queues:

๐ Nick Schwadererย sharedย GitHub - scarpe-team/scarpe: Scarpe - shoes but running on webview

๐ Ruby Cademyย sharedย a benchmark of checking for duplicates using include in an Array or Set:

๐Joel Mossย sharedย about how Ruby brevity makes naming easier:

๐ Ruby Cademyย sharedย a code sample showing how to work with timeouts and retry:

๐Gavin Morriceย sharedย what they think Hanami does better than Rails:

๐ Ruby Cademyย sharedย another code sample about parallel assignment

๐ Chris Oliverย sharedย a Ruby tipe about removing conditionals:

Tom Hockettย replied with another way of doing this:

๐ Ryan Castilloย asked about authorization solutions:

Matt Swansonย replied showing how to implement authorization with a PORO:

Among other proposed solutions:
I also think this proposal from Matt Swansonย could be a simpler way to think about authorization:

๐ Ruby Cademyย sharedย a code sample showing two ways to do multi-line assignments:

๐ Donn Felkerย sharedย a code sample:

๐ค I imagine that if you have read this so far, you find value in this newsletter.
๐งฐ Gems, Libraries, Tools and Updates
๐งฐ Sharon Rosnerย announced that Polyphony 1.4 is released

๐งฐ Marco Rothย announced the release of current.js version 0.2.0

๐งฐ Ruby Languageย sharedย CVE-2023-36617: ReDoS vulnerability in URI
๐งฐ Gavin Morriceย published a new gemย rubocop-magic_numbers: A RuboCop Cop that detects the use of magic numbers within instance methods
๐งฐ Ruby On Railsย announced the release ofย Rails Versions 7.0.5.1, 6.1.7.4 have been released! - read more about the CVE details here
They also announced Rails 7.0.6 has been released
๐งฐ Kevin Newtonย announced they are updatingย sorbet-eraser: Erase all traces of sorbet-runtime code
๐งฐ Kevin Newtonย announced a new PR for YARP aboutย Introduce SourceRange by kddnewton ยท Pull Request #1087
๐งฐ Xavier Noriaย announced a new update for Railsย about Introduce config.autoload_lib_once(ignore:) by fxn ยท Pull Request #48610
๐งฐ Hanamiย announced the release ofย Hanami 2.1.0.beta1
๐งฐ Koichi Itoย announced an update to VSCode extension vscode-rubocop v 0.2.0
๐งฐ Jeremy Evansย announced the release ofย Sequel 5.70.0 Released ยท jeremyevans sequel ยท Discussion #2059
๐งฐ Mari Imaizumiย announced the release ofย Release v1.7.1 ยท ruby/irb
๐งฐ Maciej Mensfeldย sharedย a new release of Karafka version 2.1.6

๐งฐ Nick Schwadererย announcedย Release v0.2.1 ยท scarpe-team/scarpe - Discord

๐ค Related (but not Ruby-specific)
๐คNate Berkopecย sharedย about using automated checks to cap technical debt:

๐ค Rob Palmerย sharedย updates coming to Javascript:

๐ค Eric Berryย sharedย about using UUIDs as primary keys and generated a discussion about pros and cons of using UUIDs as primary keys.

Here are some of the replies, but you should read them all



๐ค Konnor Rogersย sharedย about making overflow scrollable with up/down:

More content: ๐ ๐ ๐ง ๐ฅ โ๐พ
๐ Newsletters
๐ Ruby On Railsย published a new edition aboutย A CVE, two new Rails releases in a week, config.autoload_lib, and m...
๐ Ruby Radarย published a new edition aboutย A Brighton'd Future
๐ง Podcasts
๐ง Tightly Coupled Book Clubย published a new episode about Active Record Validations
๐ง Maintainable Software Podcastย published a new podcast aboutย Maintainable
๐ง Jason Swettย published a new podcast aboutย 187 - Sin City Ruby Keynote Speaker Obie Fernandez
๐ง Indie Railsย published a new podcast aboutย Michael Buckbee - Balancing Marketing & Development While Building Wafris
๐ง The Ruby On Rails Podcastย published a new podcast aboutย Career Ladders with Megan Marquardt-Ray
๐ง Remote Rubyย published a new podcast aboutย The Case For NOT Taking A Management Path
๐ฝ๏ธ ๐ฅ Videos
Talks
๐ฝ๏ธ Rubber Duck Dev Show published a new episode about Dragon Ruby Panel / Party! (audio version)
๐ฝ๏ธ Jason Swettย published a new video aboutย Adding tests to an existing application (Code with Jason Meetup session)
๐ฝ๏ธ Paweล Strzaลkowskiย published a new video about DDD in Ruby on Rails - Aggregate Pattern
๐ฝ๏ธ Victoria Melnikovaย published a short video from the interview with Mike Perham. See a full episode about Dev Propulsion Labs โ Ep. 4 Developer Tools: Bootstrap or Fundraise
๐ฝ๏ธ (related) Aaron Francisย published a new video aboutย The Javascript hype cycle and React burnout
Screencasts
๐ฅ Dave Kimuraย published a new episode aboutย Email Tracking
๐ฅ Dean De Hartย published new videos:
โ๐พ Articles
Whatโs new
Michael Buckbeeย published a new article aboutย No Rails World ticket? Here's what to do โ โBelow I've listed every Ruby/Rails conference I could find and tried to pull out some of the unique and interesting ways that the organizers are boosting the community with their effortsโ
Vipul A M published a new article about Rails.env.local? in Rails 7.1 โ โRails 7.1 introduced a new method Rails.env.local? which returns true if the environment is development or test. This is useful when we want to run some code only in development or test environment.โ
Flavio Wuenscheย published a new article aboutย Ruby + ActiveSupport = ๐ง๐ปโโ๏ธ โ โUse ActiveSupport methods and improve your ruby coding experienceโ
Cody Normanย published a new article aboutย Blue Ridge Ruby Recap โ โIt feels like weโre in the midst of a regional Ruby conference renaissance. Itโs has been great seeing these types of events come back and think itโs a good sign of the health and resilience of the Ruby communityโ
Adrian Marinย published a new article aboutย My first Brighton Ruby โ โIโm on the train towards London. I still need to decompress from everything that happened in the past two days. I hope it doesnโt sound harsh when I say โto decompressโ, but it does feel like I experienced so many things and met so many cool folks in such a tiny period of timeโ
How-Tos
Harrison Broadbent published a new article about Deploying Ruby on Rails with Dokku (including Redis, Sidekiq, ARM servers and Docker) โ โI've tried to put together the ultimate Dokku + Ruby on Rails guide. This guide covers all the basics โ deploying to x86 and ARM machines, deploying Sidekiq and Redis, dockerizing our Rails app, adding post-deploy scripts, adding LetsEncrypt for SSL and HTTPS, adding backups to S3, and adding an automatic deploy script to GitHubโ
Igor Alexandrovย published a new article aboutย Good oldies: MRSK and Rails โค6 โ โHaving gained such positive experiences with MRSK on our newer projects, I decided to transition one of our Rails 6 applications from Capistrano to MRSK for deploymentโ
Hello Maxย published a new article aboutย Simplifying Authentication with HTTP Basic Auth in Rails โ โToday, weโll explore an alternative - HTTP Basic Authentication. I recently had the opportunity to implement this in SeQura, and Iโm excited to share this experience with youโ
Joe Masilottiย published a new article aboutย Call Swift APIs from Stimulus in Turbo Native โ โBut what if we want to interact with a native API, like sending a push notification or reading calendar data? Enter the JavaScript bridgeโ
Lucas Barretย published a new article aboutย A pragmatic guide for Cypress On Rails โ โI have discovered a wonderful gem, Cypress On Rails, that eases a lot of the process of E2E with Rails App. This incredible gem deserves an article. Hence through this article, we will navigate through the installation and the basics of the uses of Cypress On Rails.โ
Dean De Hartย published a new article aboutย HTTPS Certificates for LocalHost with Ruby on Rails 7 โ โ when working on a local development environment โ localhost โ itโs common to see developers bypassing HTTPS and opting for HTTP instead. While this might seem like an insignificant detail during development, it can lead to unexpected issues when transitioning to production where HTTPS is typically enforcedโ
Andre Nunesย published a new article aboutย How to use Prettier to lint Ruby files โ โIn this blog post, we will guide you through the process of setting up Prettier as a code formatter for your Ruby files in Visual Studio Code (VSCode)โ
Mafulย published a new article aboutย How to use Cloudflare R2 with Ruby on Rails Active Storage โ โIn this post, we will go through object storage and use Cloudflare R2 for the serviceโ
Mattias Velamssonย published a new article aboutย Ruby GUI with Glimmer โ โย a couple of weeks ago, I stumbled upon a Ruby library that makes creating a fully functional GUI super easy. Obvisouly, I had to try it out. So in this post, I'll walk through how I used this library to create a simple currency converterโ
Deep Dives
Evgeniy Deminย published a new article aboutย Rails upgrade: why itโs hard and a single trick on simplifying it.. โ โIโm working on a Rails upgrade for a giant monolith application. Itโs been a while already, and while Iโm encountering many issues trying to jump from 5.2+ right to 6.1, I want to share some of the storiesโ. You should also read the followup article aboutย Rails upgrade led to Ruby bug.
Paweล Dฤ browskiย published a new article aboutย Rails value object design pattern โ โRegardless of the type of architecture do you like the most in Rails, you will find value objects design pattern useful and, which is just as important, easy to maintain, implement and test. The pattern itself doesn't introduce any unneeded level of abstraction and aims to make your code more isolated, easier to understand and less complicatedโ
Kevin Menardย published a new article aboutย IO#reopen and its surprising side effect โ โA short debugging story that taught us about the attributes of IO operationsโ
Lucian Ghinda published a new article about Ruby's range literals and their effect on Rails Active Record queries โ โLearn about the difference between inclusive and exclusive end ranges and the SQL queries each choice producesโ
Akshay Khotย wrote a new article about Let's Build a Web Application in Ruby without Rails โ โRails is great for building web apps. But it can be quite overwhelming if you don't know how web applications work. In this series of articles, we'll build a simple but complete app in plain Ruby without Rails, to get a deeper understanding and appreciation of everything Rails does for usโ
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.