CI Code Climate


rubygems-tasks provides agnostic and unobtrusive Rake tasks for building, installing and releasing Ruby Gems.

require 'rubygems/tasks'


The Rake tasks which you use to manage a Ruby project should not be coupled to the project generator which you used to create the project. Project generators have nothing to do with the Rake tasks used to build, install and release a Ruby project.

Recently, many Ruby Developers began creating Ruby projects by hand, building/releasing RubyGems using gem build / gem push. Sometimes this resulted in RubyGems being released with uncommitted changes, or the developer forgetting to tag the release. Ruby Developers should have access to agnostic and unobtrusive Rake tasks, to automate the release process.

This is what rubygems-tasks seeks to provide.


  • Provides tasks to build, install and push gems to
    • Loads all project metadata from the .gemspec file.
    • Supports loading multiple .gemspec files.
    • Supports pushing gems to alternate gem servers.
  • Supports optionally building .tar.gz and .zip archives.
    • build:tar
    • build:zip
  • Supports Git, Mercurial and SubVersion Source-Code-Managers (SCMs).
    • Supports creating PGP signed Git/Mercurial tags.
  • Provides optional sign tasks for package integrity:
    • sign:checksum
    • sign:pgp
  • Provides a console task, for jumping right into your code.
  • Defines task aliases for users coming from Jeweler or Hoe.
  • ANSI coloured messages!


  • Does not parse project metadata from the README or the ChangeLog.
  • Does not generate or modify code.
  • Does not automatically commit changes.
  • Does not inject dependencies into gems.
  • Zero dependencies.



$ gem install rubygems-tasks


Specifying an alternate Ruby Console to run: do |tasks|
  tasks.console.command = 'pry'

Enable pushing gems to an in-house gem server: do |tasks| = ''

Disable the push task: false)

Enable building .tar.gz and .zip archives: {tar: true, zip: true})

Enable Checksums and PGP signatures for built packages: {checksum: true, pgp: true})

Selectively defining tasks: 'REL-%s')


rake build    # Builds all packages
rake console  # Spawns an Interactive Ruby Console
rake install  # Installs all built gem packages
rake release  # Performs a release

Copyright (c) 2011-2020 Hal Brodigan

See LICENSE for details.