diff --git a/rbenv.d/exec/gem-rehash/rubygems_plugin.rb b/rbenv.d/exec/gem-rehash/rubygems_plugin.rb index e1d7b262..21d5ad9a 100644 --- a/rbenv.d/exec/gem-rehash/rubygems_plugin.rb +++ b/rbenv.d/exec/gem-rehash/rubygems_plugin.rb @@ -3,7 +3,7 @@ hook = lambda do |installer| # 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" + `rbenv rehash` end rescue warn "rbenv: error in gem-rehash (#{$!})"