#​691 — February 22, 2024

Read on the Web

Together with  pgAnalyze

Ruby Weekly

A Decent VS Code Setup for Ruby and Rails Development“Setting up VS Code for Ruby on Rails development can be tricky, so I wrote this article to help. In it, I share different VS Code extensions for things like autocomplete, linting, formatting and more.” Harrison also shares his own Ruby on Rails extension pack that brings together all his suggestions in one install.

Harrison Broadbent

▶  Discussing YJIT with Maxime Chevalier-Boisvert — A 23-minute podcast episode with veritable Ruby VM and JIT compilation expert, Dr. Maxime Chevalier. She explains the whole concept of JIT from scratch in an accessible way, making this a great on-ramp to understanding what YJIT does, if you’ve ignored it all so far. (There’s a third party transcript that’s easy to read, too, if you prefer.)

The Ruby on Rails Podcast

Free eBook: Advanced Database Programming with Rails and Postgres — Learn about subqueries, materialized views, and custom data types in Postgres and Rails. We walk through realistic real-life examples, translating first into SQL, and then into Rails code. Every example comes with source code so you can follow along.

pganalyze sponsor

Using Serial Ports with Ruby — Feeling that his UART gem wasn’t receiving enough, um, tender love, Aaron penned this article to show just how easy it is to work with serial ports and Ruby, particularly to interact with his.. Geiger counter?

Aaron 'Tenderlove' Patterson

JRuby 9.4.6.0 Released: The JVM-Based Ruby Implementation — The latest Ruby 3.1-targeting version of the longstanding JVM-based implementation adds support for the Prism Ruby parser (as introduced in CRuby 3.3), improves Ruby 3.1 compatibility, updates a variety of dependencies, and pattern matching is now supported by JRuby’s JIT compiler.

JRuby Core Team

💡 JRuby 9.3.14.0 has landed, too, if you want to remain targeting Ruby 2.6.x.

Need for Speed: Using RuboCop with Prism — Prism (formerly YARP) is a Ruby parser that wants to be the only Ruby parser in town (notably, TruffleRuby is now using Prism.) The creator of RuboCop shares that the migration to Prism has begun there too, and he anticipates solid speed gains.

Bozhidar Batsov

  • ⚠️ Rails 6.1.77, 7.0.8.2 and 7.1.3.2 have all been released as security releases.

  • 📅 RubyCentral takes a look back at RubyConf 2023 and it's packed with stats, including attendee numbers, revenue, expenses, and more. RubyConf is back for its 2024 run this November in San Diego, CA.

  • 🚂 If you're doing any Rust these days, you might be interested to check out Loco, a Rails-inspired MVC webapp framework for the language.

📕 Articles & Tutorials

Changing the IRB Autocomplete Colors with Reline::Face — The release of autocomplete for IRB was marred, for some, by not looking too hot with their terminal's color scheme (leading some folks to tweak their color settings). But now there's a way to change the styling to something you prefer by adding a few lines to .irbrc instead.

Josh Smith

Ruby Koans in the Browser — We’re seeing more and more Ruby in the browser with WebAssembly (including in last week’s issue) and now someone has browser-ified the popular Ruby Koans exercises (note: this took a good 15-20 seconds to load in my browser).

Andi Idogawa

Get a Free Ruby on Rails Security & Update Checker — Ensure the safety and integrity of your sensitive information with our advanced Ruby on Rails security measures.

reinteractive/CodeCareShield sponsor

How to Generate Random Numbers in Ruby — Just rand(x) right? That’s one way, but this post goes into so many more options. A good primer/reminder.

Akshay Khot

Hotwire Modals in Rails with Stimulus and Turbo Frames — We’re enjoying the excitement in the blogosphere on creating useful UI elements with Stimulus and Turbo.

Ayush Newatia

💡 I've recently found working through Hotrails' Turbo Rails tutorial to be particularly valuable to get up to speed with the basics.

Playing Sounds in Rails with the Audio API — Akshay picked up on how 37signals’ Campfire lets users play sounds in its chat interface, which involves a little more integration with Rails than you might think.

Akshay Khot

Finding Postgres Rows Too Large for BTree Indexes — From the “it may never happen to you” department, here’s an approach to find data that exceeds the allowed index size, which you could run into during a migration, as here.

Will Jessop

How to Use Private SSH Keys with Passwords in GitHub Actions
Josef Strzibny

A Look at Some Popular git config Options
Julia Evans

🛠 Code & Tools

Pagy 7.0: The Popular Pagination Gem — It’s been around for years, it claims to be the best pagination gem, and it’s still getting updates, so what’s not to like? v7 adds JSON:API support and rounds out its ARIA compliance. – GitHub repo.

Domizio Demichelis

SearchCop 1.3: Search Engine-Like Fulltext Query Support for Active Record — Adds support for an easy to use search interface on top of AR models. It’s smarter than you might imagine and can handle using operators to query against columns – it’s not just for text. Support for Postgres’s hstore and jsonb columns has also just been added.

Benjamin Vetter

Self-Service APM When You Want It. Superior Support When You Need It — Need Ruby app performance answers fast? Get setup with Scout APM in 4 min and avoid the runaround of large support teams

Scout APM sponsor

WebMock: Stub and Set Expectations on HTTP Requests for Testing — Supports lots of HTTP libraries like Net::HTTP, Excon, the http gem, and Curb::Easy.

Bartosz Blimke

Flatware 2.2: A Parallel Test Runner for RSpec and Cucumber with Pretty Output — Now supporting Ruby 3.3.

Brian Dunn