Created
May 3, 2009 07:30
-
-
Save itspriddle/105886 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
# copy_gems.rb | |
# Run on Computer A to generate copy_gems.sh | |
# Run copy_gems.sh on Computer B to install all gems (including all versions) | |
list = `sudo gem list --local` | |
output = "#!/bin/bash\n" | |
list.each_line do |line| | |
name, ver = line.split(" (") | |
ver.gsub(/[\(|\)]/, '').split(', ').each { |v| output << "sudo gem install #{name.chomp} -v #{v.chomp} --no-rdoc --no-ri\n" } | |
end | |
File.open("copy_gems.sh", "w") { |f| f.write(output) } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment