RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

Submit a post

You can use basic HTML markup (e.g. <a>) or Markdown.
Note that your post may be edited to suit the format of the site.

As you are not logged in, you will be
directed via GitHub to signup or sign in

Post Preview

Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.

RSpec book update: Testing in isolation with mocks (and friends)

I just shipped a new chapter for the current edition of Everyday Rails Testing with RSpec. In this release, I’ve totally replaced my introduction to testing in isolation with mocks (and stubs, and fakes, and spies, and doubles, oh my). My beliefs on when and how to mock have changed a lot since the last major release of the book, and this updated chapter reflect my newer opinions. I hope you find it useful!

Demystifying Rails Generators: What I Wish I Knew

Rails generators, and their underlying Thor integration, can be surprisingly opaque — even for experienced developers. I recently found myself deep in this rabbit hole, frustrated by the lack of clear documentation and practical guidance. So I wrote the article I wish I’d found back then. If you’ve ever struggled to understand or customize Rails generators, this guide breaks it down in a way that’s approachable and practical. [more inside]

Kamal Deployment: The Newest Form of Self-Torture

Struggling with Kamal 2 for Rails deployments? This detailed guide walks through common pitfalls and their solutions when setting up Kamal with Rails 8, Solid Stack, and multi-environment configurations. Learn practical workarounds for Docker permissions, credentials management, and Shrine file uploads that will save you days of frustration. [more inside]

Creating a Ruby Gem to Add AI Power to the Trix Text Editor – Trix-Genius v0.0.5 Germ

In my latest article, I’m diving deep into how to add AI power to your Rails application by creating a custom gem: trix-genius. Learn how I’ve integrated AI features into the Trix text editor, and how you can do the same for your applications! ✨ [more inside]

Implementing an Inventory Module in Ruby on Rails: Handling Concurrency with Database

When implementing an inventory module in a Ruby on Rails application, ensuring consistency in stock levels is crucial. If multiple users try to purchase the same item simultaneously, concurrency issues can lead to overselling. In this post, we’ll explore two approaches to handling inventory management: using a simple counter with database locks to prevent race conditions & improving performance and reliability using SKIP LOCKED for efficient inventory allocation. [more inside]

🚀 Mastering Rails Migrations: The Power of change_table 🚀

Are you handling database migrations efficiently in your Ruby on Rails projects? Many developers use add_column, rename_column, and remove_column separately—but did you know that change_table can streamline multiple modifications in a single block? [more inside]

Loading older posts