#655 — May 25, 2023 |
✍️ When I started looking around for things to write up for this issue, I was surprised at how.. quiet it was – even Björk would have something to say about it. Everyone's probably taking a well-earned nap after RubyKaigi, so for this week, we make the most of things by going a little off piste here and there.. :-) |
|
Ruby Weekly |
Rails Brotli Cache: A Drop-in Enhancement for Rails' Cache — Brotli isn’t yet another sour green vegetable but a pretty good data compression algorithm developed by Google, and you can take advantage of its improvements by slotting it into your Rails app. Paweł Urbanek |
Nokogiri 1.15 Released — Nokogiri is one of the longest standing and most heavily used libraries in the Ruby world and remains incredibly useful for parsing and processing XML and HTML documents. It also continues to be developed and 1.15 now lets you optionally make Nokogiri and libxml2 use your system’s Sparkle Motion |
Blue/Green Deployments for Rails on Any Cloud — Deploy Rails applications hassle-free on any cloud and in any region with full database support, custom traffic rules, zero-downtime deployments, blue/green and canary releases, WAF, and more. Try it today for free, and get $100 in credits with the code: Cloud 66 sponsor |
QUICK BITS
|
📕 Tutorials, Articles, and Videos |
Using the Gateway Pattern in Rails — This pattern is useful when you need to communicate with an external API or service as it provides a stable abstraction between your system and the potentially ‘foreign’ vocabulary and nature of an external system. Matt Brictson |
Adding Recommendations to an App with pgvector and OpenAI — The idea is simple on the surface: you use OpenAI to provide the embeddings (as vectors), store those vectors in Postgres using the pgvector extension (now supported by RDS) and use Andrew Kane’s neighbor gem to do a nearest neighbor search across those vectors. Rails is used in the post but you can bring these pieces together in any Ruby app. Maurício Maia |
This seems an appropriate time to plug our sister newsletter: Postgres Weekly 😁 |
Need to Upgrade Rails—But Don’t Have the Budget? — We offer fixed-cost, monthly retainers starting at $1,000 so you can pay off your tech debt. Don’t delay—start today 🚀 FastRuby.io | Ruby Tech Debt Services sponsor |
Eleven HTML Best Practices for Login & Sign-up Forms — It's not Ruby specific, but this is a pretty quiet week, the Evil Martians blog about Ruby a lot, and.. you almost certainly have an app with a login or signup form that doesn't live up to all of these best practices 😉 Andrey Sitnik |
If you'd prefer something more Ruby related from the Martians, their guide to using RuboCop is good. |
An Introduction to Rails Engines — Engines are essentially mini apps that can be embedded within other Rails apps and they open up a variety of options for making apps more modular and adding packaged functionality into existing apps. Kudakwashe Siziva |
Concerns in Rails: Everything You Need to Know
|
Three Things To Avoid When Building Rails Controllers
|
🛠 Code & Tools |
Rails I18n Manager: Complete Translation Editor and Workflow — A Rails engine that provides a Web-based interface for working on your app’s translations. Billing itself as a ‘low tech’ approach, it provides a full workflow with import and export, access to Google-powered translations, and lets you keep your translations right in your app’s repo. Weston Ganger |
docx: A Ruby Library for Working with Tatsuya Sato |
DSL Factory: A DSL to Create DSLs? — It’s a bit meta, but abstracts away the boilerplate of creating a DSL into a DSL of its own. The author blogs more about it here. Tom Rothe |
Check Out Our Latest Release — Our latest platform updates enable you to uplevel your CI/CD workflows with security, flexibility, and control. Buildkite sponsor |
Bullet Train: An Open-Source Rails Template for SaaS — Has a ton of features to get your next multi-tenant SaaS idea off the ground with common gems (Devise, CableReady) and frontend frameworks (Tailwind, Stimulus) plus some novel ideas, like so-called “Super Scaffolding.” Bullet Train |
|
|
🔎 Looking Behind the Ruby Scenes.. |
Syntax Tree: Generate a Syntax Tree in the Browser — SyntaxTree is, broadly speaking, a suite of tools built atop Ruby’s own parser with which you can create, manipulate and inspect syntax trees. We like this Web-based version, though, as it provides a quick way to see how Ruby interprets a piece of code, all in a visual way. Kevin Newton |