-
-
Save vortizhe/1089238 to your computer and use it in GitHub Desktop.
Reads a file with the output from gem list and installs the gems
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
#! /usr/bin/ruby | |
# So you want to start developing an already "woking" project. No | |
# bundle, config.gem's not present or messing up dependencies. Fear | |
# not! | |
# Do a "gem list" wherever the project is already working | |
# (production?, some colleage machine?). Make a file with this format: | |
# | |
# chronic (0.2.3) | |
# colored (1.1) | |
# daemons (1.0.10) | |
# fastercsv (1.4.0) | |
# fastthread (1.0.7) | |
# feed-normalizer (1.5.1) | |
# feedtools (0.2.26) | |
# ferret (0.11.4) | |
# gcnovus-avatar (0.0.7) | |
# gem_plugin (0.2.3) | |
# gettext (1.93.0, 1.9.0) | |
# | |
# Run "rawclone yourgemsfile" on your machine and your ready to go. | |
# | |
# Tip 1: You could add this file to your repo for easy sharing and | |
# faster developing machine setup | |
# | |
# Tip 2: I would not recomend this without a proper rvm installation. | |
# | |
# Tip 3: Seriously install, configure and learn to use rvm. | |
# | |
# Tip 4: Eat more vegetables and be happy. | |
unless ARGV[0].nil? | |
File.open(ARGV[0],'r').each do |line| | |
line.gsub!(/\(|\)|,/,'') | |
gem_name = line.split[0] | |
line.split[1..-1].each do |version| | |
system("gem install #{gem_name} -v=#{version} --ignore-dependencies --no-rdoc --no-ri") | |
end | |
end | |
else | |
puts "Usage: rawclone file" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment