Short Ruby News - Edition #64
Discover the world of Ruby in this comprehensive newsletter covering week 42 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
๐ย Georgie Boyย announcedย a library of components built with Phlex โ PhlexUI - Component Library
๐ Thoughtbot announced an update of the Ruby Science book to work with Rails 7 and Ruby 3.2.2
๐ Keshav Biswa launched a new programming language for fun called Confuscript
๐ย Dave Paolaย announced applications for the Agency of Learning are open at agencyoflearning.com
๐ย Ruby Cademyย announced they are going to launchย RubyCademy on 27 October:
๐
Events
๐ Rubyfuza & Friendsย sharedย they will organise a new conference in 2024 in Cape-Town:
๐ ย Adrian Marin announced the first meetup ofย Ruby Romania meetup #01, Wed, Nov 22, 2023, 6:30 PM | Meetup
๐ All about Code and Ruby
๐Benoitย sharedย ย a benchmark between Struct.new VS Data.define
๐ย Emmanuel Hayfordย sharedย a Rails config to start the rails console in the sandbox by default:
๐ย Dhaval Singhย sharedย a good picture showing a high-level overview of how Ruby works:
๐ Joel Drapperย sharedย about how to use ChatGPT to explain code from the book:
๐ Paul Mucurย sharedย about how to get the client IP when using Cloudflare:
๐ Robertย sharedย about bundler supporting an option to use a local gem file:
๐ย Lucas Mendelowskiย sharedย about how to make Turbo work with View Transitions while keeping the header persistent:
๐ย Brad Gesslerย sharedย how to generate Dockerfiles for Rails using dockerfile-rails gem:
๐ Joel Drapperย sharedย a code sample from their new web framework Yippee!
๐ Stephenย sharedย a new channel for SQLite onย Join the Naming Things Discord Server!
๐คย David Heinemeier Hanssonย sharedย about Rails being fit for software entrepreneurship:
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.
๐ ย Irina Nazarovaย sharedย a thread (read it on nitter) about Rails world:
๐ย Andrew Culverย sharedย how to fix then rbenv install fails with LDFLAGS error:
๐ย John Pollardย sharedย a before and after refactoring code sample (the code screenshots are too big to include them here - you have to open the post on twitterย orย nitter):
๐ย Chris Oliverย sharedย that Jumstart Rails now also offers the option to use Stripe Checkout:
๐ย Brad Gesslerย sharedย a code sample from the Superform showing how to build a UI with Ruby code:
๐ย Vladimir Dementyevย sharedย they added view transitions for AnyCable Docs (click on theย postย or onย nitter to see the video of view transitions)
๐ย Nate Berkopecย sharedย how quickly a multi-million line Rails monolith starts:
๐ย Ernest Anyewe Adonuย sharedย their reasons why they chose Ruby on Rails for a project:
๐ย Bram Jettenย sharedย how they are avoiding N+1 queries with a mix of AR and Ruby processing:
๐ย Chris Oliverย asked the community about what questions they will like to ask DHH and got a lot of replies:
Heย also asked for questions for Jorge and Amanda:
I think it is good to read the replies. It shows a bit of some community concerns or questions.
๐ย Nate Berkopecย sharedย a quick tip to improve performance:
๐ย David Alejandroย sharedย about using local_time gem to display time in local users time:
ย ๐ย John Nunemakerย sharedย a use case for Github Copilot Chat:
๐ย Stanislav Katkovย sharedย two improvements when using Solid Cache:
๐ย Brad Gesslerย sharedย about advantages and disadvantages when using Tailwind:
๐ย Rob Zolkosย sharedย they encountered an issue when using Turbo with route paths that contains dots:
Tony Messiasย explained why it does not work:
Benjamรญn Silva H.ย sharedย a possible solution:
๐ย Samuel Cochranย sharedย about reverting from GraphQL and React to Rails:
๐ย David Alejandroย sharedย a thread (read it allย or onย nitter) about printing to local printer from Rails with Turbo (this is just the first part of it):
๐ย Lewis Youlย sharedย about Rails mark_for_destruction:
๐ย Bhumiย sharedย a Ruby trick about associating a name for a class:
๐ย Matt Swansonย sharedย about using Rails core concepts:
๐ย Amanda Brooke Perinoย sharedย a threadย (read onย nitter) about the purpose of Rails Foundation:
๐ย Brad Gesslerย sharedย a perspective about Rails sessions:
๐ย Nate Berkopecย sharedย about collecting data with Resource Timing API:
๐ย Akash Manoharย sharedย a code sample showing how to load partial data for multiple rows of a table:
๐ย Josef Strzibnyย sharedย a perspective about how to think about Kamal:
๐ Avoย sharedย the discounted prices for Avo 3 are available until the final launch:
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
๐ ๐งฐ Simon Chiuย announced a new projectย geetfun/deployed: Mountable deployment engine for Ruby on Rails using Kamal
๐งฐ Andy Malehย published a new release of Glimmer Wordle:
๐งฐ JRuby released a new version of JRuby 9.4.4.0 version
๐ ๐งฐ Jeffrey Charles announced a new project called Ruvy - Ruvy aims to initialize the ruby VM using wizer and execute ruby code passed into the wasm
๐งฐ Cรฉdric Delalandeย announced a new version forย barley: Barley is a dead simple, fast, and efficient ActiveModel serializer
๐งฐย Dr Nicย announced they are adding RBS signatures to tiktoken ruby gem โย RBS signatures by drnic ยท Pull Request #16 ยท IAPark/tiktoken_ruby
๐งฐย RubyGemsย announced a new releaseย 3.4.21 Released
๐งฐย David Heinemeier Hanssonย announced a new release of kredis โย Release v1.6.0 ยท rails/kredis
๐งฐย Marco Rothย announced a new release for stimulus-lspย Release v0.2.0 ยท marcoroth/stimulus-lsp
๐งฐ Maciej Mensfeld announced a new release of karafka version 2.2.8
๐ค Related (but not Ruby-specific)
๐คย Gergely Oroszย sharedย about the influence of current economy on software engineering:
๐คย Tony Dinhย sharedย about ChatGPT affecting Stack Overflow traffic (see the source for this data):
๐คย Chris Wanstrathย sharedย a thread about how Github started:
๐คย Jason Swettย asked a question about priorities in a software project:
๐คย Emma Bostianย asked managers and engineers how to celebrate a job well done and received a lot of answers. Read the repliesย (read onย nitter)
๐คย Daniel Vassalloย sharedย a perspective about motivation:
๐คย Cameron Mollย sharedย about their experience with Tailwind:
There is an interesting discussion with Adam Wathan (the creator of Tailwind):
๐คย Nate Hopkinsย sharedย about talking and doing when operating a business:
๐คย Irina Nazarovaย shared a thread about the important of documentation:
More content: ๐ ๐ ๐ง ๐ฅ โ๐พ
๐ Newsletters
๐ Greg Molnarย published a new edition of This Week in Rails aboutย Rails World Talks Online, Fix Of A 13 Years Old Bug And More!
๐ Awesome Ruby Newsletterย published a new edition aboutย Awesome Ruby Newsletter Issue 387, Oct 19, 2023
๐ Hotwire Weeklyย sharedย ย Week 42 - Welcome new Subscribers, Rails World Recordings, and more!
๐ Ruby Weeklyย published a new edition aboutย The state of Ruby HTTP clients
๐ Harrison Broadbent published a new edition aboutย The Rails Notes Newsletter Issue #15
๐ Ruby Radar published a new edition aboutย Hacking at RubyConf 2023
๐ง Podcasts
๐งย Indie Railsย published a new podcast aboutย IndieRails | Greg Molnar - Security on Rails
๐ง Lucas Barretย published a new episode aboutย Gem Ruby Show: Stephen Margheim , Active Record Enhanced SQLite Adapter
๐งย Ruby For Allย published a new podcast aboutย Plants, Zombies, and Pull Requests | Ruby for All | Episode 48
๐งย Remote Ruby published a new episode about Live With Adam Wathan At Rails World 2023
๐ง The Ruby on Rails Podcastย published a new episode aboutย The Ruby On Rails Podcast Episode 492: Vladimir Dementyev On Layered Design
๐ง Stephanie Minn and Joรซl Quennevilleย published a new episode aboutย The Bike Shed: 404: Estimation
๐ฝ๏ธ ๐ฅ Videos
๐๏ธ Conference Talks
๐๏ธ Euruko published the videos at https://2023.euruko.org/recordings
๐๏ธย Ruby On Railsย published a new video aboutย Rails World 2023 - Amsterdam - Oct 5 & 6
Screencasts
๐ฅย Dean DeHart published a series of videos:
๐ฅย Yaroslav Shmarovย published a new video aboutย Ruby on Rails #146 Generate Barcodes with JsBarcode. StimulusJS, Importmaps
๐ฅย Jason Swettย published a new video aboutย Building a Word Stemmer Part 2 (Ruby OOP + Testing)
๐ฅ Thoughtbotย published a live video aboutย ย Rails Development
๐ฅย Drifting Rubyย published a new video aboutย Episode 424 - Solid Cache | Drifting Ruby
๐ฅย Steven R. Bakerย published a new video aboutย The Shitshow 2: Adding AppSignal to a Rails 7 Application
โ๐พ Articles
Whatโs new ๐
Amanda Perino published an article aboutย Rails World 2023: A Recap Of Two Days Of Rails โ โThe first edition of Rails World in Amsterdam was a two-day, two track community conference featuring technical talks, demos, workshops, networking, and keynotes about the latest features and best practices in Rails developmentโ
Milesย published a new article aboutย New App Sneak Peek โ โThe existing tools I found were more focused on tracking after eating which is great in terms of capturing data and measuring over time, but I found really didnโt help me with locking in a routine. I wanted to fix this and bring some of this planning side along with tracking into an easy to use appโ
Craig Kerstiensย published a new article aboutย Postgres Goodies in Ruby on Rails 7.1 โ โIn conversations with developers over the week, I had some notable takeaways from the newest version of Ruby on Rails that I just had to get written upโ
Alkesh Ghorpade published an article aboutย Rails Adds The Ability To Pass The Expires At Option To Active Storage/Blog#Signedย โ โWhen using the expires_in option to generate an expiring URL, the URL will change each time it is generated. This means the browser cannot cache the URL, and the user will have to download the file each time they access itโ and published an article aboutย Ruby 3.3 Introduces Range Overlap? Method
Ruby Centralย published an article aboutย September 2023 Monthly Updateย โ โDuring September, Ruby Central's open source work was supported by 35 different companies, including Fastly, Ruby member Zendesk and Ruby Shield sponsor Shopifyโ
Jeff Charles published an article aboutย Introducing Ruvy (2023)ย โ โWeโve recently open sourced a project called Ruvy! Ruvy is a toolchain that takes Ruby code as input and creates a WebAssembly module that will execute that Ruby codeโ
Iย published an article aboutย A Quest For A Method Defined In Mainย โ โExplore the question: Where is a method defined in Ruby when not defined inside an object?โ
Ruby Gemsย published an article aboutย September 2023 Ruby Gems Updates Ruby Gems Blogย โ โRead on to find out what updates were made to RubyGems and RubyGems.org in Septemberโ
Vladimir Dementyev published an article aboutย The Future Of Full Stackย Rails: Turboย Morphย Drive โ โIn this two-part series, Iโd like to explore these aforementioned frontend technologies and demonstrate how we can use them today with Turbo 7โ
Stephan Hagemannย published an update about their bookย ย Message to Readers of Gradual Modularization โ โA message I sent to the readers of Gradual Modularization for Ruby and Rails regarding the new update published todayโ
Deep Dives ๐
Victor Shepelevย published another article in his series about new features in Ruby aboutย โUseless Ruby Sugarโ: Pattern Matching (Pt. 1)ย โ โThe importance of this feature and its effect on the Ruby code is a source of severe disagreements. Some put it in the โmere syntax sugarโ bin (which is how it ended up as a part of this seriesโฆ which I already regret a bit because the feature is a huge thing to discuss!). At the opposite extremum, there are people who believe that pattern matching is a separate paradigm, and โif you want a language with one, you just switch to that language.โ
Bill Tihenย published an article aboutย Rails Design: Protected Modules With Injection โ โLong-term Manageable Rails through Low Dependency/Entanglement and Loose Couplingโ
Noel Rappinย published an article aboutย Better Know A Ruby Thing #1: Method Missing โ โI do think the way that Ruby uses method_missing to make infinite APIโs not just possible but easy to write is very basic to what I think of as the Ruby aesthetic. Itโs also not something that everybody loves, and itโs something that you can get into trouble with.โ
Akshay Khotย published an article aboutย Understanding The Instrumentation Api In Railsย โ โThe Instrumentation API in ActiveSupport serves a dual purpose. You can use it to implement the observer (pub-sub) pattern, as well as benchmark how long it took to execute some actionโ
Radan Skoricย published an article aboutย Understand Rails Async Database Queries By Reimplementing Them In 51 Lines Of Simple Rubyย โ โIโve read the original PRs that added the async loading functionality and used the debugger to dig down to the actual raw happy path logic and summarised my findings here. So letโs peel away the layers from ActiveRecord async queriesโ
David Copelandย published an article aboutย The Katz Conjecture: You Must Understand What An Abstraction Abstractsย โ โTo effectively use any abstraction, you mustโeventuallyโhave a solid understanding of what itโs abstracting. Iโm calling this the Katz Conjecture because Yehuda Katz made this statement in a conference talkโ
How-Tos ๐
Mike Coutermarshย published an article aboutย Easy Rails Controller Rate Limiting With Rails.Cacheย โ โHere's an easy trick I reach for when wanting to add simple rate limiting to an endpointโ
Brad Gesslerย published an article aboutย Better Rails Forms With Superformย โ โSuperform is a new form helper library built from scratch on top of Phlex that makes building forms in Rails less tediousโ
Josef Strzibny published an article aboutย Adding Slugs To Active Record Models In Railsย โ โHereโs how to implement a Sluggable module that turns an ActiveRecord model into one with a user-defined slug for nice page identifiersโ
Ahmed Nadarย published a new article aboutย Mastering Rails Web Navigation with link_to and button_to Helpers โ โIn Part 1 (you are reading), we'll explore the Rails web navigation system, understand how Rails handles requests, and delve deep into the world of middlewareโ and Mastering Rails Web Navigation With Link To And Button To Helpers Part 2
Iย published an article aboutย Chat GPT, Github Copilot: How To Generate Tailwind Width Configurationย โ โExamining the results of ChatGPT 4, Github Copilot and Chat and Phind in generating Tailwind width configurations utilizing the golden ratioโ
Aestimo Kirina published an article aboutย Advanced Usages Of Action Policy For Ruby On Railsย โ โIn part one of this series, we looked at some basic usages of Action Policy. Now we'll leverage Action Policy for more advanced authorization use casesโ
Harrison Broadbentย published an article aboutย Action Mailer Console Script For Bulk Testing Mailersย โ โHere's a handy ActionMailer console script for sending test emails locally (packaged up as a rake task)โ
Hopper Geeย published an article aboutย Rest Manย โ A visual guide about how to use the rest-man
gem
Khash Sajadi published an article aboutย Using Rails With SES, SNS And SQS To Avoid Bounce Rateย โ โUsing SES directly, you will not get some of the features you might need to control the bounce rate of your emails. In a perfect world, you'd want to monitor bounce rate of your emails and take them out of your email list so no further email is sent to those recipientsโ
Rishi Jain published an article aboutย ย I18n Gem Gotchas in Ruby 3.0: What You Need to Know โ โIf you are using the i18n gem opens a new window with Ruby 3.0 or are planning to upgrade Ruby to 3.0 while using the i18n gem, this blog post will cover a gotcha that can be tricky to understandโ
๐ Related
Julia Evansย published an article aboutย Some Miscellaneous Git Factsย โ โNone of these things feel super surprising in retrospect, but I hadnโt thought about them clearly beforeโ
Josef Strzibnyย published an article aboutย Marketing My Book To 1000 Salesย โ โHereโs a simple list of what I was doing on my way to 1000 sales of my book and how much success I had with themโ
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.