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
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
Yesterday
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]
Vibe Coding
Time to stop hiring $100k/year developers and hire an intern for $10k/year and pay $100/year for an AI Agent. The intern doesn’t even need to understand the code it is generating and just help guide it to the solution. https://www.driftingruby.com/episodes/vibe-coding
🚀 Supercharging Trix Editor with AI & Rails Generators! 🧠
Have you ever wanted to extend Trix Editor in Ruby on Rails and automate its setup? In my latest article, I share how I’m building Trix Genius, a gem that enhances Trix with AI-powered features. [more inside]
nanoc-webpack.rb adds webpack to nanoc :)
nanoc-webpack.rb is a nanoc filter that adds webpack support to nanoc. The filter connects nanoc to the JavaScript, TypeScript, and nodejs ecosystems.
🚀 Modularize Your Code, Improve Organization! 🚀
In my latest blog post, I dive into how you can modularize your code and improve your application’s structure by automating the creation of Ruby gems. 🛠️ [more inside]
2025 Reminder That DHH Is a Total Idiot!
2025 Reminder That DHH Is a Total Idiot!… https://andymaleh.blogspot.com/2025/03/2025-reminder-that-dhh-is-total-idiot.html
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]
Touch Events (swipe) using Stimulus
Create a touch-ready carousel + (Tinder-like) swipe functionality: https://railsdesigner.com/stimulus-touch-events/
How to Configure Sign in With Apple in Rails 8 without Omniauth
I recently battled to get “Sign in with Apple” working without using the OmniAuth gem just to get the nice looking button from Apple. 😆 This guide explains all the quirks and gotchas you’ll need to get it working too. [more inside]
Want to make your GitHub profile stand out? 🚀
Your GitHub page is more than just a collection of repositories—it’s your developer portfolio. Whether you’re looking for new job opportunities or showcasing your open-source contributions, making your profile visually appealing can set you apart! [more inside]
Rails 8 Assets: Combining importmaps
Here’s how to combine Importmaps to be able to use different maps on different parts of the website: Rails 8 Assets: Combining importmaps
Example of how to use Data class
I followed up from last week article about value objects with some examples of usage I found in some of my own projects and one from TheOdinProject
📬 Letter Thief - An emails logger for Rails
Would you like to log emails in your Ruby On Rails app? Letter Thief logs sent emails in your database and can also open them in development. If you used letter_opener you should be familiar with it, but now you can also use it where you don’t have a disk (like Heroku) [more inside]
🚀 Simplify Ruby Gem Development with Docker! 🛠️
If you’re looking for a clean, reproducible way to scaffold a new Ruby gem, check out my latest article! I walk through how to set up a Dockerized development environment with PostgreSQL to ensure a smooth and consistent workflow. [more inside]
Me vs Typical Members of Ruby/Rails Subreddits
Me vs Typical Members of Ruby/Rails Subreddits … https://andymaleh.blogspot.com/2025/03/me-vs-typical-members-of-rubyrails.html
How to configure Postgres as an Accessory with Kamal 2 and Rails 8 on a single server
This guide shows how to deploy a Rails 8 app with a Postgres database using Kamal 2 to a single VPS. It makes up for the lack of documentation around Postgres accessories in the official Kamal docs and helps you avoid common configuration errors connecting to the accessory DB from your Rails app. [more inside]
🚀 Writing Clean, Reusable, and Scalable Code in Rails
As Rails developers, we constantly strive to write efficient, maintainable, and DRY code. In my latest article, I explore: [more inside]
A Ruby implementation of the HyperLogLog algorithm for efficient cardinality
Hyll is a Ruby implementation of the HyperLogLog algorithm for the count-distinct problem, which efficiently approximates the number of distinct elements in a multiset with minimal memory usage. It supports both standard and Enhanced variants, offering a flexible approach for large-scale applications and providing convenient methods for merging, serialization, and maximum likelihood estimation. [more inside]
Rubocop Obsession 0.2 released
Rubocop Obsession’s MethodOrder cop now supports and autocorrects the alphabetical style on top of the more classic drill_down and step_down top-to-bottom styles. Ordering methods alphabetically may look unusual at first, but on the flip side it is a reliable and unambiguous ordering style. In any case, it is good to have options!