method
report_activate_error
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.
report_activate_error(gem)private
Report a load error during activation. The message of load error depends on whether it was a version mismatch or if there are not gems of any version by the requested name.
# File lib/rubygems.rb, line 878
def self.report_activate_error(gem)
matches = Gem::Specification.find_by_name(gem.name)
if matches.empty? then
error = Gem::LoadError.new(
"Could not find RubyGem #{gem.name} (#{gem.requirement})\n")
else
error = Gem::LoadError.new(
"RubyGem version error: " +
"#{gem.name}(#{matches.first.version} not #{gem.requirement})\n")
end
error.name = gem.name
error.requirement = gem.requirement
raise error
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