Useful Ruby Gems for Your Next Project

Niani Byrd
2 min readSep 15, 2021

Thankfully, web developers can now have access to libraries of code that will provide automatic solutions and functionality to their code. Instead of writing everything from scratch, we have access to a massive array of gems that will speed up the development of our code. Choosing the right gems for your project will make your life a thousand times easier. I’m going to discuss some of my favorite gems below.

Pry

Pry is a fantastic tool for debugging code. Pry allows the developer to enter into IRB (Interactive Ruby) and play around with any code that they want to. It’s similar to a virtual playground where you can stop your code anywhere you place your ‘binding.pry’ and examine and debug the code. A great tool to assist with errors and broken code!

OmniAuth

OmniAuth is an authenitication system that uses Rack middleware. It allows the developer to generate third party authentication from sites such as Google, Facebook, GitHub, etc. On one of my projects for Flatiron School, I used OmniAuth to authenticate users through Google while I also giving them the option to manually log in through my site. I’d highly recommend!

Capybara

Capybara is an acceptance test framework for web applications. It works perfectly and runs in tandem with RSpec. This gem will imitate in the users’ actions in the browser and the suggest carious convenient methods for debugging tests.

Faker

Faker is a great library for producing demo data such as names, phone numbers, and addresses.

RuboCop

RuboCop makes sure that your code is conforming to Ruby’s style guide. Any violations are reported in the command line so you can be sure that your code is on par with how Ruby code should ideally be written. It’s fully customizable so that you can adjust how picky you want the suggestions to be.

There you have it! The beauty of Ruby is its community of developers that are always creating new and innovative gems to make our lives easier. It’s standard practice to use gems while coding in Ruby, so why not use what you can to make solving problems, debugging, and authentication easier? With that being said, gems won’t solve all your problems, but we still love what they’re capable of!

--

--