by Eric Hodel

RubyGems 2.2.0 includes major enhancements, minor enhancements and bug fixes.

To update to the latest RubyGems you can run:

gem update --system

If you need to upgrade or downgrade please follow the how to upgrade/downgrade RubyGems instructions. To install RubyGems by hand see the Download RubyGems page.

Special thanks to Vít Ondruch and Michal Papis for testing and finding bugs in RubyGems as it was prepared for the 2.2.0 release.

Major enhancements:

RubyGems can check for gem dependencies files (gem.deps.rb or Gemfile) when rubygems executables are started and uses the found dependencies. This means rake will work similar to bundle exec rake . To enable this set the RUBYGEMS_GEMDEPS environment variable to the location of your dependencies file. See Gem::use_gemdeps for further details.

A RubyGems directory may now be shared amongst multiple ruby versions. Upon activation RubyGems will automatically compile missing extensions for the current platform when the built objects are missing. Issue #596 by Michal Papis By default different platforms do not share gem install locations so this must be configured by setting GEM_HOME to a common directory. Some gems use fixed paths for requiring extensions and are not compatible with sharing gem directories. The default sharing location may be configured by RubyGems packagers through Gem.default_ext_dir_for. Pull Request #744 by Vít Ondruch.

Minor enhancements:

RubyGems checks the ‘allowed_push_host’ metadata value when pushing a gem to prevent an accidental push to a public repository (such as rubygems.org). If you have private gems you should set this value in your gem specification metadata. Pull request #603 by Seamus Abshere.

gem list now shows results for multiple arguments. Pull request #604 by Zach Rabinovich.

now shows results for multiple arguments. Pull request #604 by Zach Rabinovich. gem pristine --extensions will restore only gems with extensions. Issue #619 by Postmodern.

will restore only gems with extensions. Issue #619 by Postmodern. Gem::Specification#files is now sorted. Pull request #612 by Justin George.

For gem list and friends, “LOCAL” and “REMOTE” headers are omitted if only local or remote gem information is requested with –quiet. Pull request #615 by Michal Papis.

and friends, “LOCAL” and “REMOTE” headers are omitted if only local or remote gem information is requested with –quiet. Pull request #615 by Michal Papis. Added Gem::Specification#full_require_paths which is like require_paths, but returns a fully-qualified results. Pull request #632 by Vít Ondruch.

RubyGems now looks for the https_proxy environment variable for https:// sources. RubyGems will fall back to http_proxy if there is no https_proxy. Issue #610 by mkristian.

RubyGems now creates directories in .gem files. Issue #631 by marksolaris.

RubyGems raises an exception when a specification includes its gem. Issue #623 by notEthan.

RubyGems now displays relevant release note information when updating RubyGems. Issue #647 by Trevor Wennblom.

Deprecated Gem::Installer::ExtensionBuildError in favor of Gem::Ext::BuildError. The old constant is an alias for the new constant.

When extensions are built the gem_make.out file is always written now, even on success. This will help with debugging bad builds that report success.

If a specification fails to validate RubyGems shows a link to the specification reference guide. Issue #656 by Markus Heiler.

When using gem install -g , RubyGems now detects the presence of an Isolate, Gemfile or gem.deps.rb file.

, RubyGems now detects the presence of an Isolate, Gemfile or gem.deps.rb file. Added Gem::StubSpecification#stubbed? to help determine if a user should run gem pristine to speed up gem loading. Pull request #694 and #701 by Jon Leighton.

to speed up gem loading. Pull request #694 and #701 by Jon Leighton. RubyGems now warns when a gem has a pessimistic version dependency that may be too strict.

RubyGems now warns when a gem has an open-ended dependency.

RubyGems now raises an exception when a dependency for a gem is defined twice.

Marked the license specification attribute as recommended. Pull request #713 by Benjamin Fleischer.

RubyGems uses io/console instead of stty when available. Pull request #740 by Nobuyoshi Nakada

when available. Pull request #740 by Nobuyoshi Nakada Relaxed Gem.ruby tests for platforms that override where ruby lives. Pull Request #755 by strzibny.

Bug fixes: