Skip to main content

Use a Rails Linter

Published: Dec 1st, 2020

This is part of Joyful Rails, a list of recommendations to make developing your Rails app more productive and joyful.

In this article, we are talking about using a Rails linter.

When

The longer you wait to add a linter, the more work you will have to correct style errors that have accumulated. For that reason, I recommend adding a Rails linter as early as possible.

Why

A Rails linter like the Rails Best Practices gem can catch and sometimes correct common mistakes and problems in Rails code.

How

To install, add rails_best_practices to the development section of your Gemfile.

To run, use the command rails_best_practices .