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.
This Week in Rails - 2023-05-05
Video coverage of the This Week in Rails newsletter
Montreal.rb May 2023: Integrating REST APIs w/ Microsoft Kiota
The video for the Montreal.rb (Ruby/Rails Meetup) May 2023 talk “Integrating REST APIs with Microsoft Kiota” has been posted! Microsoft Kiota is an open-source technology that can automatically generate SDKs for HTTP REST APIs in Ruby (or any programming language) to save software engineers from having to write error prone API client code that handles authentication, authorization, serialization, and exception handling manually. [more inside]
Rails 7.1 got rid of the apostrophe for the right single quotation mark!
Rails 7.1 got rid of the apostrophe (U+0027) for the right single quotation mark (U+2019), which will likely break your tests. It added a new intersects? method to ActiveRecord::Relation.
The Dangerous Query Method Deprecation (And How to Fix it)
Have you ever tried to update a Rails app from 5.2 to 6.0, or from 6.0 to 6.1? If so, you might have seen this deprecation: [more inside]
Welcome to Rails Cheat Sheet
After using Rails for over a decade, I took a step back and tried to think about all the stuff people starting out in Rails should know at In addition to including all the obvious stuff, I tried to focus more on areas of Rails that are still messy, like assets and deployments, to help fill in some of the undocumented gaps folks might run into.
A Ruby gem to send your ActionMailer mail through one of several delivery methods, se
For more detailed info on the boilerplate and use in development, check out the Mailtrap ActionMailer Balancer article:
How to write better specifications for your features
For years, I’ve worked without thinking much about feature specifications. Many teams endure empty Trello cards, neglected Jira tickets, and misaligned communication. So today, I want to share how to write better specifications for your features.
All About Roda With Jeremy Evans | Rubber Duck Dev Show 83
In this episode, we learn all about the Roda toolkit for building Ruby web applications with Jeremy Evans:
Configuring Rails to use HTTPS in local development
Ever wanted to access a Rails app locally over HTTPS? There is a gem called localhost that can make this remarkably easy. However, everyday development using HTTPS requires a few more steps. This post explains how to set up the localhost gem, how to start Rails properly, and how to update OpenSSL to trust the local certificate. Plus, for those of us using Vite as their frontend build system, this post explains how to secure the Vite dev server as well.
Ask_ChatGPT new release (streaming, CLI, etc)
now with streaming support (see response instantly), a CLI tool, and some other improvements. [more inside]
[ANN] httpx 0.23.0 released
httpx 0.23.0 has been released. [more inside]
Ruby Retry But Better: Faraday Loop
Ever need a simple way to retry a block of code? Maybe you need a maximum number of retries? Exponential backoff? Different handling for different exceptions? We took the Faraday Retry Middleware which is pretty awesome and just hoisted it up into its own utility without actually using/needing Faraday: Faraday Loop
dry-credentials
Ever wanted to use encrypted credentials in a non-Rails project without having to pull ActiveSomething dependencies? Take a look at the new “dry-credentials” gem. It’s not part of the dry organisation but related in spirit.
Update half a Billion records in Rails
Ever wonder how would Rails handle updating 600M records in PostgreSQL. Answer is Pretty well! In this article I will show you how. [more inside]
7 Common Mistakes in Rails Upgrades
Ruby on Rails is a popular web application framework that is constantly evolving with new versions being released frequently. While upgrading to a newer Rails version can bring new features, better performance, and security patches/improvements, it can also be a challenging task. [more inside]
Hacking Rails Implicit Rendering for View Components & Fun
I went in-depth at https://fly.io/ruby-dispatch/hacking-rails-implicit-rendering-for-view-components/ on how I got a Rails app working that uses 100% Phlex components. The technique can be used to integrate Rails with ViewComponents, handle batch resource selection & manipulation, responder classes, Hanami-style action classes, and more.
Reflection on doing a 24h startup challenge in Rails
Last week, I finished my 24 hours startup challenge. I was building an uptime monitoring tool with Rails. Here’s my reflections.
⚡ Chaskiq, the self-hosted live chat, releases version 2.0.0 ⚡
We are thrilled to announce the release of Chaskiq 2.0.0, a major milestone for our source-available live chat and messaging system. This update marks the successful migration of our text editor, Dante. [more inside]
Configuring RuboCop to scan the right files in a Rails project
Despite using RuboCop for years, I was recently surprised to find that it was not scanning certain important files in my Rails project. When I dug further, I discovered that RuboCop’s system for configuring inclusion and exclusion rules is quite complicated and exhibits some of the infamous “Rails magic”. What started out as a simple question – why isn’t RuboCop checking my bin/setup script? – turned into hours of troubleshooting. Here’s what I learned: