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:

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:

👐 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

👐 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 [email protected] 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:

👉 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

🧰 Marco Roth announced the release of current.js version 0.2.0

They also announced Rails 7.0.6 has been released

🧰 Hanami announced the release of Hanami 2.1.0.beta1

🧰 Koichi Ito announced an update to VSCode extension vscode-rubocop v 0.2.0

🧰 Mari Imaizumi announced the release of Release v1.7.1 · ruby/irb

🧰 Maciej Mensfeld shared a new release of Karafka version 2.1.6

🤝 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 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

🎧 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)

📽️ 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.

Reply

or to participate.