Ruby Gems & How To Use Them

Sarah Daniels
Zero Equals False
Published in
4 min readApr 19, 2019

--

In my recent “what the hell is Ruby and how do I use it” learning experience, I’ve been taught how to build something from bare bones. Writing out every minute detail — methods, variables, routes, files they go in — all of it. In a dizzying whirlwind of trying to comprehend and regurgitate these small details, I thought “holy crap, is this what it’s like to be a developer? This is insane amounts of work just to get tiny components working. I am totally incapable of this”. Right before I hit “sitting in the shower crying” rock bottom, I was introduced to Rails and many wonderful gems.

What are gems?

Gems are, on the surface, a little package of code that makes your developing life a pinch easier (read: fewer emotional breakdowns, more productivity). Gems are a library that provide the foundation for establishing certain functions — this library contains all the files and code to help you do that. Some of these functions include (but are not limited to) credit card processing, testing your code, and user authentication.

The best and worst thing about gems is they are open source. I can meander over to rubygems.org and download practically any gem I can think of. But with that, you might have to sift through some junk. At the time of this post, there are 151,973 gems available!

--

--

Sarah Daniels
Zero Equals False

Software engineer & registered nurse based in Boulder, Colorado.