Learning Goals 🎯

  1. Understand how to use and employ Ruby gems
  2. Use knowledge from everything taught up until this point to create a full project
  3. Google your way out of errors and confusing ideas

Prerequisites 🤔

Overview

Up until now, we've learned perhaps the most central topics to Ruby on Rails as a framework. However being a great Rails developer means knowing more than just how Rails works but also how to build powerful projects really quickly. One big way to do this is through "Gems".

Gems are libraries that other people have written to add functionality to your rails app. A library is simply some code that someone else has written that can be dragged and dropped into your own application. They help you not reinvent the wheel and save a lot of time!

They bring both pros and cons. Pros: You have access to thousands of gems created by people all around the world to simplify development. Cons: Since anyone can make a Gem, using one means you trust their code to work for you in all the scenarios you need it to.

Not all gems are perfect! Many are unmaintained and only work for old versions of rails. This means that diving into "the mines" to find useful gems must be a careful endeavor. The good thing, however, is that you are always welcome to edit code in gems for your own custom use!

In this guide we will discuss three things: talk about how to install a gem in your project, some common and useful gems to know about, and finally things to look out for when it comes to using gems you find online in your projects.

Using Gems