Isaac Sloan - Web Developer, Photographer, Musician and Citizen of Earth
Banner700

How to Create a Ruby Gem

November 10, 2014

1. Create your gem:

Here is the most modern approach to gem crafting:

bundle gem gemname
cd gemname

edit your_gem.gemspec and add description, summary, required gems and optional website. Add required gems for development such as rspec, rails or minitest to the Gemfile.

2. Add testing framework:

RSpec:
rspec --init
touch spec/your_gem_spec.rb
Minitest:
# Rakefile
How to Create a Ruby Gem