Created
September 16, 2009 16:10
-
-
Save choonkeat/188128 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this ruby script generates a shell script to reinstall/recompile your gems | |
puts '#!/bin/bash' | |
puts 'export ARCHFLAGS="-arch x86_64"' | |
`gem list`.each do |line| | |
if line =~ /\s*(.+)\s+\((.+)\)/ | |
gem_name, versions = [$1, $2] | |
versions.split(/, /).each do |version| | |
puts "gem install #{gem_name} --version='#{version}'" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment