Performs various checks before installing the gem such as the install repository is writable and
its directories exist, required Ruby
and rubygems versions are met and that dependencies are installed.
Version and dependency checks are skipped
if this install is forced.
The dependent check will be skipped this install is ignoring dependencies.
# File lib/rubygems/installer.rb, line 739
def pre_install_checks
verify_gem_home options[:unpack]
# If we're forcing the install then disable security unless the security
# policy says that we only install signed gems.
@security_policy = nil if
@force and @security_policy and not @security_policy.only_signed
ensure_loadable_spec
if options[:install_as_default]
Gem.ensure_default_gem_subdirectories gem_home
else
Gem.ensure_gem_subdirectories gem_home
end
return true if @force
ensure_required_ruby_version_met
ensure_required_rubygems_version_met
ensure_dependencies_met unless @ignore_dependencies
true
end