Skip to content

Instantly share code, notes, and snippets.

@byplayer
Created May 21, 2012 02:29
Show Gist options
  • Save byplayer/2760309 to your computer and use it in GitHub Desktop.
Save byplayer/2760309 to your computer and use it in GitHub Desktop.
File.open('Gemfile', 'r') do |f|
f.each_line do |line|
items = line.split(' ')
gem_name = items[0]
version = nil
if items[1] =~ /\(([0-9\.]+)/
version = $1
end
puts "gem install #{gem_name} -v #{version} --no-rdoc --no-ri"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment