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.
A simple table partitioning example
A simple db partitioning example in postgresql - https://railsexamples.com/database-partitioning-example/
An Introduction to Nix for Ruby Developers
Learn how to build and share reproducible Rails development environments: https://blog.appsignal.com/2024/08/07/an-introduction-to-nix-for-ruby-developers.html
Building our calendar UI with Rails, Phlex, & Turbo
In this 15-minute video, I’ll show you how I rebuilt our scheduling feature with an interactive calendar, using Phlex, Turbo Frames, and a sprinkle of Alpine.js.
Refactoring, testing and getting the time/money for it
A little bit about how I try to convince our stubborn clients to allow time to refactor and test, specially on legacy projects we inherit [more inside]
Processing Large Jobs
In this episode, we will upload a CSV file but need to pass it into a background job. This can prove to be difficult based on the hosting infrastructure so we’ll explore some mechanisms to work around them. We’ll also look to optimize Solid Queue to handle the large number of jobs. https://www.driftingruby.com/episodes/processing-large-jobs
Using OmniAI to Search LLM Embeddings with Rails and Postgres
OmniAI now supports generating embeddings using Mistral and OpenAI APIs. In conjunction with pgvector, this is an excellent option for indexing and searching data to pass through an LLM prompt within a Ruby on Rails application… [more inside]
How to setup Rails Guides for offline use
Learn how to setup the official Ruby on Rails Guides for offline use. It will save your life when you find yourself somewhere with weak or no internet connectivity and need to look something up quickly!
Best practices for Ruby on Rails data migrations
The blog post “Best Practices for Ruby on Rails Data Migrations” https://www.monterail.com/blog/best-practices-for-ruby-on-rails-data-migrations offers practical advice on handling data migrations in Ruby on Rails applications. It covers key strategies for ensuring smooth, reliable migrations, including techniques for minimizing downtime, managing large datasets, and maintaining data integrity. The post provides actionable tips and best practices to help developers execute migrations effectively while avoiding common pitfalls.
Grepfruit: Codebase Search with Regex
If you’ve been looking for a way to search your codebase with regex patterns, here it is: Grepfruit. Ideal for CI/CD pipelines and beyond, Grepfruit lets you search for, e.g., TODO comments, excluding files or directories, truncating the output, and providing colorized results for easy readability.
Setting Up Custom Metrics with Effective Alerts for a Ruby App in AppSignal
Let’s learn how to use custom metrics in AppSignal for deep insights into our Ruby app’s performance: https://blog.appsignal.com/2024/07/31/setting-up-custom-metrics-with-effective-alerts-for-a-ruby-app-in-appsignal.html
Ruby on Rails Developer Quiz
Ruby on Rails Developer Quiz - How many questions can you get right?
War Against Bots
War Against Bots is an article I wrote after I had launched www.whoishiring.jobs. I immediately got hit by form spam and automatic vulnerability scans. I investigated the problem and promptly employed a few simple defense mechanisms that reduced the incidence of these attacks to almost zero.
Exercise: Multiplayer Minesweeper with Rails and Hotwire
For practice, I take a very simple pure ruby Minesweeper implementation and package it into a multiplayer web version with Rails and Hotwire. The article focuses on making it work correctly with users playing concurrently: Exercise: Multiplayer Minesweeper with Rails and Hotwire (It’s also live on minesvshumanity.com)
https://www.smily.com/engineering/rds-database-migration-series---integrating-ruby-on
In the previous blog post, we covered our story of migrating a giant database of almost 11 TB. Here comes the last part of the series—making Ruby on Rails applications work with RDS Proxy. [more inside]
puma_after_reply - an ability to work with "rack.after_reply" hook
puma_after_reply - a new gem that provides an ability to work with Puma’s/Rack’s “rack.after_reply” feature in threaded and non-threaded way with a support for before/after/on_error hooks for each custom reply. [more inside]
Run and roll back migrations via UI
Tired of using the CLI for running and rolling back migrations? There is a solution for you. The recent release of actual_db_schema (v0.7.6) provides a web UI to list, view details, migrate, and roll back your schema migrations. With zero configuration, simply install the actual_db_schema gem, visit http://localhost:3000/rails/migrations, and enjoy. In addition to the actual migrations, it will also show the phantom ones (those that were migrated in feature branches) that can be rolled back with just one click. Watch a short video in this tweet that shows all that in action.
Integrating Sidekiq with Async
In this post I explain how you can have persistent connections to Redis using Async::Redis client inside Sidekiq and why it doesn’t work by default. There are some basic explanations of how Async and Sidekiq work and some source code.