method
required_location
ruby latest stable - Class:
Gem
Method deprecated or moved
This method is deprecated or moved on the latest stable version. The last existing version (v1_9_3_392) is shown here.
required_location(gemname, libfile, *requirements)public
Full path to libfile in gemname. Searches for the latest gem unless requirements is given.
# File lib/rubygems.rb, line 901
def self.required_location(gemname, libfile, *requirements)
requirements = Gem::Requirement.default if requirements.empty?
matches = Gem::Specification.find_all_by_name gemname, *requirements
return nil if matches.empty?
spec = matches.last
spec.require_paths.each do |path|
result = Gem::Path.path(spec.full_gem_path).add(path, libfile)
return result if result.exist?
end
nil
end Related methods
- Class methods
- activate
- activate_dep
- activate_spec
- all_load_paths
- available?
- bin_path
- binary_mode
- bindir
- cache
- cache_dir
- cache_gem
- clear_paths
- config_file
- configuration
- configuration=
- datadir
- default_bindir
- default_dir
- default_exec_format
- default_path
- default_rubygems_dirs
- default_sources
- default_system_source_cache_dir
- default_user_source_cache_dir
- deflate
- dir
- ensure_gem_subdirectories
- ensure_ssl_available
- find_files
- gunzip
- gzip
- host
- host=
- inflate
- latest_load_paths
- latest_rubygems_version
- latest_spec_for
- latest_version_for
- load_env_plugins
- load_path_insert_index
- load_plugin_files
- load_plugins
- load_yaml
- loaded_path?
- location_of_caller
- marshal_version
- path
- paths
- paths=
- platforms
- platforms=
- post_build
- post_install
- post_reset
- post_uninstall
- pre_install
- pre_reset
- pre_uninstall
- prefix
- promote_load_path
- read_binary
- refresh
- required_location
- ruby
- ruby=
- ruby_engine
- ruby_version
- searcher
- searcher=
- source_index
- source_index=
- sources
- sources=
- ssl_available?
- suffix_pattern
- suffixes
- time
- try_activate
- ui
- unresolved_deps
- use_paths
- user_dir
- user_home
- win_platform=
- win_platform?
- Private methods
-
all_partials -
each_load_path -
find_home -
latest_partials -
report_activate_error