Skip to content
Abraham edited this page Sep 23, 2016 · 1 revision

This guide will provide steps to easily create a gem and publish it to https://rubygems.org using bundler

Creating a gem

% bundle gem your_gem_name

This will prompt several questions about the gem testing suite, license & code of conduct. Once you complete the wizard, you will then have access to your project files and start working.

Building your gem

% gem build your_gem_name.gemspec

This instruction will package your code into an actual gem, excited isn't.

Publishing your gem

% gem push your_gem_name-0.0.1.gem

This will push the gem to https://rubygems.org and now will be accessible to download via a Gemfile or the gem install command

Other useful commands

There are other rake commands that can help you build or release your gem:

% rake build
% rake release

You can always check for available rake tasks by running rake -T

Clone this wiki locally