Skip to content

Instantly share code, notes, and snippets.

@hsbt
Created March 8, 2019 01:55
Show Gist options
  • Save hsbt/9c2adbe38408069fc138b7e2d993f9ef to your computer and use it in GitHub Desktop.
Save hsbt/9c2adbe38408069fc138b7e2d993f9ef to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'rubygems/commands/pristine_command'
gems = Gem::Specification.all.map do |spec|
spec.name if spec.platform == RUBY_ENGINE && spec.missing_extensions?
end.compact.uniq
cmd = Gem::Commands::PristineCommand.new
cmd.options[:args] = gems
cmd.execute
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment