method
activate_dependencies
v1_9_3_392 -
Show latest stable
- Class:
Gem::Specification
activate_dependencies()public
Activate all unambiguously resolved runtime dependencies of this spec. Add any ambigous dependencies to the unresolved list to be resolved later, as needed.
# File lib/rubygems/specification.rb, line 765
def activate_dependencies
self.runtime_dependencies.each do |spec_dep|
if loaded = Gem.loaded_specs[spec_dep.name]
next if spec_dep.matches_spec? loaded
msg = "can't satisfy '#{spec_dep}', already activated '#{loaded.full_name}'"
e = Gem::LoadError.new msg
e.name = spec_dep.name
raise e
end
specs = spec_dep.to_specs
if specs.size == 1 then
specs.first.activate
else
name = spec_dep.name
Gem.unresolved_deps[name] = Gem.unresolved_deps[name].merge spec_dep
end
end
Gem.unresolved_deps.delete self.name
end Related methods
- Instance methods
- <=>
- ==
- _dump
- activate
- activate_dependencies
- add_bindir
- add_dependency
- add_development_dependency
- add_runtime_dependency
- add_self_to_load_path
- author
- author=
- authors
- authors=
- base_dir
- bin_dir
- bin_file
- cache_dir
- cache_file
- cache_gem
- conflicts
- contains_requirable_file?
- date
- date=
- default_executable
- default_value
- dependencies
- dependent_gems
- dependent_specs
- description=
- development_dependencies
- doc_dir
- encode_with
- eql?
- executable
- executable=
- executables
- executables=
- extensions
- extensions=
- extra_rdoc_files
- extra_rdoc_files=
- file_name
- files
- files=
- for_cache
- full_gem_path
- full_name
- gem_dir
- gems_dir
- has_rdoc
- has_rdoc=
- has_rdoc?
- has_unit_tests?
- hash
- init_with
- initialize_copy
- installation_path
- lib_dirs_glob
- lib_files
- license
- license=
- licenses
- licenses=
- loaded_from=
- mark_version
- matches_for_glob
- method_missing
- normalize
- original_name
- original_platform
- platform
- platform=
- pretty_print
- raise_if_conflicts
- rdoc_options
- rdoc_options=
- require_path
- require_path=
- required_ruby_version=
- required_rubygems_version=
- requirements
- requirements=
- ri_dir
- runtime_dependencies
- satisfies_requirement?
- sort_obj
- spec_dir
- spec_file
- spec_name
- summary=
- test_file
- test_file=
- test_files
- test_files=
- test_suite_file
- test_suite_file=
- to_ruby
- to_ruby_for_cache
- to_s
- to_yaml
- traverse
- validate
- version=
- yaml_initialize
- Class methods
- _all
- _load
- _resort!
- add_spec
- add_specs
- all
- all=
- all_names
- array_attributes
- attribute_names
- dirs
- dirs=
- each
- find_all_by_name
- find_by_name
- find_by_path
- find_in_unresolved
- find_in_unresolved_tree
- from_yaml
- latest_specs
- load
- new
- non_nil_attributes
- normalize_yaml_input
- outdated
- remove_spec
- required_attribute?
- required_attributes
- reset
- Private methods
-
add_dependency_with_type -
find_all_satisfiers -
ruby_code -
same_attributes?