Skip to content

Instantly share code, notes, and snippets.

@phil-monroe
Created April 30, 2013 21:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phil-monroe/5492134 to your computer and use it in GitHub Desktop.
Save phil-monroe/5492134 to your computer and use it in GitHub Desktop.
Recompiles all gems that have native extensions
#!/bin/bash
bundle exec ruby -e <<RUBY
require 'rubygems/commands/uninstall_command'
require 'bundler/cli'
Gem.loaded_specs.select{|k,v| !v.extensions.empty?}.keys.map do |gem|
Gem::Commands::UninstallCommand.new
.handle_options ['-x', '-I', gem]
.execute rescue nil
end
RUBY
bundle install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment