Skip to content

Instantly share code, notes, and snippets.

@charlespeach
Created July 9, 2013 03:38
Show Gist options
  • Save charlespeach/5954520 to your computer and use it in GitHub Desktop.
Save charlespeach/5954520 to your computer and use it in GitHub Desktop.
Install a list of gems from a `.gems` file.
gems = File.open(".gems")
gems.each do |gem|
puts "Installing #{gem}"
`gem install #{gem}`
end
@charlespeach
Copy link
Author

This way is easier, and puts the stdout into terminal

File.readlines('.gems').each do |line|
  output = `gem install #{line}`
  puts output
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment