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.
Rails 7.2 Upgrade Problems (of my own making)
I recently updating my Rails applications to 7.2 and ran into a few issues. Based on the experienced errors, the solutions weren’t obvious. https://blog.driftingruby.com/rails-7-2-upgrade-problems-of-my-own-making/
Serialization by example
https://railsexamples.com/serializers-in-rails/ When building APIs with Ruby on Rails, serializers play a pivotal role in data transformation and presentation. They serve as the crucial intermediary between complex Ruby objects and the streamlined JSON that your API serves to clients. Let’s take deep dive -
How to Render CSS Dynamically in Rails
In the latest post from Joy of Rails, learn some techniques and considerations for rendering CSS on-the-fly with Ruby on Rails. [more inside]
Introduction to Minitest Mocks
If you are team Minitest you might have already used mocks, but if you come from RSpec you might wonder how is mocking done in Minitest.
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.