CodeNewbie Community 🌱

Cover image for ruby gem explained
Shanker
Shanker

Posted on • Edited on

ruby gem explained

What is a Ruby Gem?

Gems are open source libraries just like jar packages in java or modules in Go, the gem contains contain Ruby code. This helps in modularization of the code. A gem can be used by a developer in their own program, without writing that piece of code.

You can check the different gems at https://rubygems.org/. Below are some of the popular gems:

Bundler β€” Provides a consistent environment for Ruby projects by tracking and installing the exact gems and versions that are needed.

RSpec β€” A testing framework that supports BDD for Ruby.

Devise β€” Devise works with authentication. Website that needs to user log-in’s, Devise handles sign in, sign up, reset password, etc.

JSON β€” Provides an API for parsing JSON from text.

Nokogiri β€” Provides HTML, XML, SAX, and Reader parsers with XPath and CSS selector support.

Rails β€” Rails is a fullstack web application development framework.

Install Gems

To Install gems locally you can run the command:

gem install [gem_name]

The gem install command fetches the code, downloads it to your computer, and installs the gem and any necessary dependencies and builds documentation for the installed gems.

To see all gems installed locally run the command

gem list

Thank you folks. Please do check my other articles on https://softwareengineeringcrunch.blogspot.com

If you like my article, you can support me by buying me a coffee ->

Buy Me A Coffee

Top comments (1)

Collapse
 
harrywilson24 profile image
harrywilson24

I’ve been a fan of ForJars for a while now, and their jar lids have never let me down. The seal they provide is second to none, keeping all my canned goods fresh and secure. What’s even better is that they also offer wide-mouth lids and rings, which are perfect for larger jars. I recently picked up a set, and they fit my wide-mouth jars perfectly. It’s so convenient to find everything I need in one place, and the quality is always top-notch. Whether you’re looking for regular lids or wide lids and rings, ForJars has you covered. Be sure to visit their site at forjars.co/collections/wide-mouth-... for all your canning needs!