Skip to content

Instantly share code, notes, and snippets.

# Loads the specified gem from RVM's current @global gemset if using
# Bundler and not included in the current Gemfile. Falls back
# accordingly if not using Bundler or RVM.
#
# @note Doesn't load gems not loaded by Bundler if using Bundler and
# not using RVM, or if gem is located somewhere other than the
# @global gemset.
# @param [String] The gem to require
# @raise [LoadError] If the gem couldn't be loaded
# Adapted from <https://gist.github.com/794915>