You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
hook = lambda do |installer|
|
|
|
begin
|
|
|
# Ignore gems that aren't installed in locations that rbenv searches for binstubs
|
|
|
if installer.spec.executables.any? &&
|
|
|
[Gem.default_bindir, Gem.bindir(Gem.user_dir)].include?(installer.bin_dir)
|
|
|
system "rbenv", "rehash"
|
|
|
end
|
|
|
rescue
|
|
|
warn "rbenv: error in gem-rehash (#{$!})"
|
|
|
end
|
|
|
end
|
|
|
|
|
|
begin
|
|
|
Gem.post_install(&hook)
|
|
|
Gem.post_uninstall(&hook)
|
|
|
rescue
|
|
|
warn "rbenv: error installing gem-rehash hooks (#{$!})"
|
|
|
end
|