Activates an installed gem matching dep. The gem must satisfy requirements.
Returns true if the gem is activated, false if it is already loaded, or an exception otherwise.
Gem#activate adds the library paths in dep to $LOAD_PATH. Before a Gem is activated its required Gems are activated. If the version information is omitted, the highest version Gem of the supplied name is loaded. If a Gem is not found that meets the version requirements or a required Gem is not found, a Gem::LoadError is raised.
# File lib/rubygems.rb, line 231 def self.activate(dep, *requirements) raise ArgumentError, "Deprecated use of Gem.activate(dep)" if Gem::Dependency === dep Gem::Specification.find_by_name(dep, *requirements).activate end