Skip to content

Instantly share code, notes, and snippets.

@mikehale
Created February 4, 2009 20:25
Show Gist options
  • Save mikehale/58326 to your computer and use it in GitHub Desktop.
Save mikehale/58326 to your computer and use it in GitHub Desktop.
# Generates an list of gem install commands. Useful for moving to enterprise ruby.
existing_gems = %<actionmailer (2.0.2, 1.3.6)
actionpack (2.0.2, 1.13.6)
actionwebservice (1.2.6)
activerecord (2.0.2, 1.15.6)
activeresource (2.0.2)
activesupport (2.0.2, 1.4.4)
existing_gems.each do |line|
name, version_line = line.scan(/(.+) \((.+)\)/).first
versions = version_line.split(', ')
versions.each do |version|
print "/opt/ruby-enterprise-1.8.6-20090201/bin/ruby /opt/ruby-enterprise-1.8.6-20090201/bin/gem install #{name} --no-rdoc --no-ri -v '#{version}'; "
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment