Overview

What is GemInstaller?

GemInstaller provides automated installation, loading and activation of RubyGems. It uses a simple YAML config file to:

  • Automatically install the correct versions of all required gems wherever your app runs.
  • Automatically ensure installed gems and versions are consistent across multiple applications, machines, platforms, and environments
  • Automatically activate correct versions of gems on the ruby load path when your app runs (‘require_gem’/’gem’)
  • Automatically reinstall missing dependency gems (built in to RubyGems > 1.0)
  • Automatically detect correct platform to install for multi-platform gems (built in to RubyGems > 1.0)
  • Print YAML for “rogue gems” which are not specified in the current config, to easily bootstrap your config file, or find gems that were manually installed without GemInstaller.
  • Allow for common configs to be reused across projects or environments by supporting multiple config files, including common config file snippets, and defaults with overrides.
  • Allow for dynamic selection of gems, versions, and platforms to be used based on environment vars or any other logic.
  • Avoid the “works on demo, breaks on production” syndrome.
  • Solve world hunger, prevent the global energy crisis, and wash your socks.

GemInstaller can be used from the command line, or embedded to run automatically on startup for a Rails app or any other Ruby program.

It has been tested on all major platforms (mac, linux, windows), and has an extensive suite of tests which are automatically run by Continuous Integration against recent versions of RubyGems (> 1.0.1 releases and trunk)..

How do I get it?

GemInstaller can be downloaded from RubyForge.

How do I use it?

See the Quick Start Guide, Tutorials, or the Detailed Documentation.

Who is responsible for GemInstaller?

GemInstaller was created by Chad Woolley.

Why not just use Rails’ config.gems?

GemInstaller has some advantages over Rails’ config.gems.

Known Issues

I have a list of high priority bugs and features that need to be addressed before a 1.0 release.

Please report any others that you find !

History

  • 0.4.5
    • Re-release without Hoe as a dependency, since it snuck itself in as a dependency in 0.4.4
  • 0.4.4
    • Compatibility with RubyGems 1.3.0
  • 0.4.3
    • Repackage gem with released version of RubyGems 1.2.0.
  • 0.4.2
    • Compatibility with RubyGems 1.2.0.
  • 0.4.1
    • Fix bug with warnings for outdated/incompatible rubygems versions.
  • 0.4.0
    • Fix multiplatform bug on windows where ruby platform requiring compile was selected over native mswin platform.
    • deprecate support of rubygems 0.9.5, 1.0.0, and 1.1.0.
    • Change handling of platforms on rubygems on Rubygems > 0.9.5, let RubyGems handle default.
    • Rename GemInstaller.run method to GemInstaller.install, keep ‘run’ as an alias for ‘install’
    • Include instructions ‍to‍ run‍ geminstaller‍ to‍ install‍ the‍ missing‍ version when‍ gem‍ version‍ error‍ is‍ detected.
    • Rubygems‍ 1.x ‍compatibility.
    • Better internal support for uninstall options.
    • Use‍ new,‍ correct‍ x86-mswin32‍ format‍ for‍ mswin32‍ platform‍ gems.
    • Update‍ warning‍ message‍ for‍ older‍ rubygems‍ versions.
    • Made tests run on Mac OS X Leopard w/RubyGems 1.0.1.
  • 0.3.0
    • Changes to work with RubyGems >= 0.9.5 and take advantage of new platform and auto-install features. See notes on RubyGems version compatibility
    • On Linux/Mac, you can now specify a RUBYGEMS_VERSION environment var to test against a specific version of RubyGems.
    • Improved smoketest.rb and autogem_test.rb
    • Tests now run on windows (only against latest rubygems, with it installed, and only via test/test_all.rb, not rake)
    • deprecated/disabled prefer_binary_platform
    • many other small cleanups
  • 0.2.5
    • Add ‘include_config’ directive to yaml config file, allowing other files to be included via ERB.
    • Fix broken links in docs – patch from Maciej Kozak (macio)
  • 0.2.4
    • Look for config file at config/geminstaller.yml as well as geminstaller.yml
    • make startup message (‘Installing Gems…’) debug level instead of info
    • Add custom descriptive error if user gets access permission error when installing a gem
  • 0.2.3 – Fix debug statement left in, upgrade rspec, improvements to test suite
  • 0.2.2 – Fix performance problems with autogem command (don’t manually recurse dependencies, gem method does it already)
  • 0.2.1 – RubyGems release 0.9.3 had some major refactoring done to the internals, which broke GemInstaller 0.2.0. GemInstaller 0.2.1 is a patch release to fix this. I did limited testing on 0.9.3 and 0.9.0. Please let me know if anything is broken on any version of RubyGems.
  • 0.2.0 – Initial release. Yay!