Creating a Ruby Gem
As covered in Chapter 7, Introduction to Ruby Gems, a gem is a way for Ruby to package and distribute Ruby programs and libraries. So far, we have been using many open source Ruby gems, which has a positive impact on the speed of development.
In this section, we will learn to create a Ruby gem. Also, RubyGems
is a package manager for the Ruby programming language and comes with tools baked in by default, which makes it really easy to create a gem and distribute it.
Let's jump right in to creating a simple Ruby gem.
Before you create your first file for your gem, you must make sure to find a suitable name for your gem. RubyGems has official documentation for naming conventions and it is advised to use this for improved programming experiences.
Note
You can refer to this naming convention at https://packt.live/2Bcz1dN.
Exercise 10.07: Creating Your Own Ruby Gem
In this exercise, we will be creating our own Ruby gem, before installing it...