You can now DRY up your Ruby version declarations with Bundler’s new Gemfile syntax.| mattbrictson.com
Turn off autoBuild.| mattbrictson.com
Starting a new project? Set your team up for success with these opinionated GitHub repository settings.| mattbrictson.com
Thor is a great way to write simple CLIs like one-off Rails scripts, but it does have its own gotchas. Here’s how to use Thor in practice.| mattbrictson.com
I discovered an easy way to implement job throttling using the ruby-limiter gem and the new “capsules” feature of Sidekiq 7.| mattbrictson.com
Autoprefixer, rollup-plugin-gzip, and vite-plugin-full-reload, plus some honorable mentions| mattbrictson.com
Using a Registry to look up collaborators in Rails, like external APIs.| mattbrictson.com
Postgres 17 has arrived! For those using Homebrew on macOS, this article offers a quick walkthrough of how to upgrade from 16 to 17, migrating over all existing data.| mattbrictson.com
Rails 7.2 uses the foreman gem for process management, which has serious limitations when it comes to interactive debugging. The run-pty Node package is an excellent alternative.| mattbrictson.com
I’ll explain the differences and benefits of Turbo Streams vs Turbo Frames in this HTML-first, test-driven tutorial. Only one line of JavaScript needed!| mattbrictson.com
How to use a Ruby-friendly syntax alternative to esoteric CSS and xpath expressions. Plus, a trick for making Capybara automatically aware of data-testid attributes.| mattbrictson.com
Rails 7.1 lacks big show-stopping additions, but there are still many improvements to the developer experience that are worth checking out.| mattbrictson.com
I’ve been wanting to build a CLI in Ruby, and Thor is the obvious library to use. But Thor has some weird behaviors that were driving me crazy. Here’s what I found, and how I extended Thor to fix it.| mattbrictson.com
I recently discovered that Rake has the ability to run tasks in parallel. For Rails projects with many test and linting tasks, this can be a huge time-saver.| mattbrictson.com
Did you know that system supports the equivalent of > dev/null output redirection? And that backticks raise an exception when a command isn’t found, but system does not? Let’s go on a deep dive into the Ruby standard library!| mattbrictson.com
Enforcing canonical URLs by redirecting to params is not safe and may raise an exception. Use strong params with allow_other_host: false for security.| mattbrictson.com
A continuous deployment recipe than can be applied to Tomo, Kamal, Capistrano, and other SSH-based CLI tools.| mattbrictson.com
Don’t overthink it! Start with a simple base set of styles and refactor by extracting files and shared components as you go.| mattbrictson.com
With the built-in rescue_responses setting, you can map exceptions to error pages in a simple, declarative way. It automatically renders JSON, too!| mattbrictson.com
If you’re embarking on writing CSS without a framework, adopting a normalize and reset stylesheet should be your first step. Here’s what I recommend.| mattbrictson.com
Here’s one way to add Vite support to the popular inline_svg gem, plus a way to implement your own helper and skip the gem dependency altogether.| mattbrictson.com
How to use Faraday and other gems to implement circuit breakers, gracefully handle API rate limits, pool connections for better performance, and more.| mattbrictson.com
Create React App has done this since 2016. Why not Rails?| mattbrictson.com
Use gateway classes to organize external API integrations and establish a clearer separation of concerns.| mattbrictson.com