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:
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
👉 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@example.com I'll do my best to draft an email for you to send inside your organization.
👉 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:
As a valued reader, your support is crucial for this publication to continue providing new posts. By becoming a subscriber, whether free or paid, you will contribute to the sustainability of my work.
👉 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.
This is a free publication that relies on the support of its readers. If you'd like to stay updated on new posts and help me continue my work, please consider subscribing for free or choosing a paid subscription.
🧰 Gems, Libraries, Tools and Updates
🧰 Ruby On Rails announced the release of Rails Versions 220.127.116.11, 18.104.22.168 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
🧰 Jeremy Evans announced the release of Sequel 5.70.0 Released · jeremyevans sequel · Discussion #2059
🤝 Related (but not Ruby-specific)
🤝Nate Berkopec shared about using automated checks to cap technical debt:
🤝 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: 📚 🗞 🎧 🎥 ✍🏾
🗞 Ruby On Rails published a new edition about A CVE, two new Rails releases in a week, config.autoload_lib, and m...
🎧 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
📽️ 🎥 Videos
📽️ Jason Swett published a new video about Adding tests to an existing application (Code with Jason Meetup session)
📽️ 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
🎥 Dean De Hart published new videos:
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.”
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”
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”
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”
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”
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.