#​708 — June 20, 2024

Read on the Web

Together with  WorkOS

Ruby Weekly

The Design Decisions and Evolution of Method Definitions — If you enjoyed Victor’s series of posts digging into Ruby syntax last year (found here), he’s back with a new series studying Ruby language design decisions. He starts with a focus on method definitions and the myriad of features available when defining methods.

Victor Shepelev

▶  SaaS on Rails on PostgreSQL — A 25-minute talk given at last week’s POSETTE Postgres conference flying through many of the considerations and techniques involved in using and scaling the use of Postgres when building modern Rails apps.

Andrew Atkinson

WorkOS: Modern Identity Platform for B2B SaaS — Start selling to enterprise customers with just a few lines of code. WorkOS provides flexible, easy-to-use APIs to integrate SSO, SCIM, and RBAC in minutes. It's used by some of the hottest startups in the world including Perplexity, Vercel, & Webflow.

WorkOS sponsor

Introducing a cd Command to IRB — While not a complete port of the popular Pry command, this brings easier object introspection into IRB. It’s (mostly) built on top of popws and pushws, so more syntactic sugar than a new feature.

Stan Lo

📄 Articles, Tutorials & Videos

Refactoring Transaction Blocks with end-Less Methods — Two weeks ago, Lucian gave us a tour of Ruby’s end-less methods. Now, he shows us a specific use case, based upon making minor improvements to two Rails apps.

Lucian Ghinda

Inertia.js in Rails: A New Era of Effortless Integration?Inertia enables building “modern single-page React, Vue, and Svelte apps using classic server-side routing”. While its main target is PHP’s Laravel framework, it can integrate with Rails too, and help you bridge the SPA / HTML rendering divide.

Svyatoslav Kryukov and Travis Turner (Evil Martians)

🚀 Need an Action Plan to Upgrade to Rails 7.2 and Ruby 3.3? — The Roadmap by @FastRubyIO: Discover the work and effort it takes to upgrade and ensure security compliance.

FastRuby.io | Upgrade Services sponsor

So We've Got a Memory Leak... — A neat post covering the thoughts and ideas that might arise when you encounter what appears to be a memory leak in an app, followed by the practical steps to actually take.

Steven Harman

💡 In related news, v1.0.2 of the MemoryProfiler gem has just been released.

📄 Running Rails System Tests with Playwright Instead of Selenium Justin Searls

📄 Rails Authentication: Gems vs. Recipes vs. Generators Joe Masilotti

📄 ActiveStorage::Blob#compose Supports Custom Blob Key in Rails 7.2 Jijo Bose

📄 UUIDv7 Implemented in 20 Languages – Surprisingly short and sweet. Anton Zhiyanov

🛠 Code & Tools

Rouge 4.3: Pure Ruby Pygments-Compatible Syntax Highlighting — A long standing project that supports over 200 different languages, including Ruby, of course. Its HTML output is compatible with stylesheets designed for the popular Python-based Pygments highlighter. GitHub repo.

Jeanine Adkisson

command_kit: A Toolkit for Building Robust CLI Commands — Define commands for a CLI app using plain-old Ruby classes with options and arguments declared as attributes. command_kit then wires everything up in good UNIX / POSIX fashion and adds features like interactive input, terminal size detection, and man pages.

Postmodern

Don't Risk Out of Date Ruby & Rails Versions — Get a free security assessment and discuss how our incremental upgrade service — CodeCare Shield — can improve the speed, security and stability of your app.

reinteractive/CodeCare® Shield sponsor

MiniMagick: A Mini Replacement for RMagick — For when you don’t need the full power of RMagick and just want access to ImageMagick / GraphicsMagick’s command line features for resizing, rotating, converting, and inspecting images.

Corey Johnson

Sunspot: Solr-Powered Search for Ruby Objects“Provides a simple, intuitive, expressive DSL backed by powerful features for indexing objects and searching for them.”

Sunspot

  • Kamal 1.7 – The container-based app deployer. Kamal's configuration is now validated and unknown keys will raise errors.

  • PublicSuffix 6.0 – Domain name parser based on the Public Suffix List.

  • Grape 2.1 – Opinionated framework for creating REST-like APIs. Changelog.

  • counter_culture 3.6 – Turbo-charged counter caches for Rails apps.

🤖 QUICK NOTE

Next week, I'm attending the AI Engineer World's Fair and look forward to seeing if any of the hopes for Ruby to play a role in the future of AI engineering are coming to fruition!

It's might be a bit late to attend in person unless you're based in SF (we have a ticket discount if you can, though) but you can subscribe to the AI Engineer YouTube channel to be notified when the livestreams go live next Wednesday and Thursday.

If you do happen to be there, come and say hi, or follow me on X/Twitter for updates :-)

— Peter Cooper, your editor