class Bundler::RubyGemsGemInstaller

def generate_plugins

def generate_plugins
  return unless Gem::Installer.instance_methods(false).include?(:generate_plugins)
  latest = Gem::Specification.stubs_for(spec.name).first
  return if latest && latest.version > spec.version
  ensure_writable_dir @plugins_dir
  if spec.plugins.empty?
    remove_plugins_for(spec, @plugins_dir)
  else
    regenerate_plugins_for(spec, @plugins_dir)
  end
end