These are the 5 Must Have Gems for Your Ruby on Rails Projects
With 133,000+ Ruby Gems in the wild, the Rails community has a library to suit most project’s needs out of the box. However, the wide breadth of options can also make choosing which gems to include a time consuming task. Here are 5 must have gems for Rails projects.
1. Bullet
The Bullet gem helps optimize the performance of your application. It can warn you during development about N+1 queries (see part 1 here), when a model is eager loaded unnecessarily and when a counter_cache would increase your application performance.
2. Rubocop
Standardizing styling of a codebase across multiple developers can be tricky especially as new members are onboarded to the team. Rubocop is a linter for Ruby that can help automatically clean up the code to conform to accepted standards or be tuned to your specific needs. Some examples of Rubocop in action can be found here.
3. Byebug
Who has not written a code similar to the one below and noticed they wanted to see more variables?
class FavoritesController < ApplicationController
def show
puts '***********'
puts my_variable
puts '***********'
render ...
end
end