Create and Deploy a RubyGem from Scratch


Taking a different approach than normal, in this coding exercise we’re going to create and a deploy a RubyGem to


Generate the Gem

bundle gem tippy

Edit the Gemspec File

# coding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'tippy/version' do |spec|          = "tippy"
  spec.version       = Tippy::VERSION
  spec.authors       = ["Jordan Hudgens"]         = ["[email protected]"]

  spec.summary       = %q{A gem for generating tip values based on a number of inputs.}
  spec.homepage      = ""
  spec.license       = "MIT"

  spec.files         = `git ls-files -z`.split("\x0").reject do |f|
  spec.bindir        = "exe"
  spec.executables   = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
  spec.require_paths = ["lib"]

  spec.add_development_dependency "bundler", "~> 1.13"
  spec.add_development_dependency "rake", "~> 10.0"
  spec.add_development_dependency "rspec", "~> 3.0"

Update the .gitignore File


Add Code

GitHub Link

Deploy to GitHub

Bundle Local Gemfile

bundle install

Generate and Deploy to

bundle exec rake release



  1. This is not what your repo has for january 23.rb It’s the next one.
    Also Rubocop prefers that you don’t do this test_8. test8 is okay. Snake casing variables and methods is good but not with numbers. I use VSCode with the Rubocop linter extension and I see green squiggly underlines for all these kinds of things. One most never worry about is # doc at the top of modules and classes. Single quotes are always preferred over double quotes without any interpolation. Methods get 10 lines or less recommended and classes and modules 100 or less lines. It really makes you think about how to simplify your code. Much like you did when you refactored this in the previous coding exercise. Thanks Jordan.


Please enter your comment!
Please enter your name here