Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
#!/usr/bin/env ruby
require 'open-uri'
patchset = ARGV[0]
version = ARGV[1]
raise 'Please specify a patchset' if patchset.nil?
raise 'Please specify a ruby version' if version.nil?
patches = open("{version}/#{patchset}").read.split("\n").map do |patch|
end.join(" ")
puts "Installing ruby with #{`ruby-install --version`}"
puts "Available Rubies: #{`ruby-install`}"
`ruby-install #{patches} ruby #{version}`
Use this snippet like so:
./install_with_patches.rb railsexpress 2.2.0
This would install Ruby version 2.2.0 with the patchset
A patchset includes a set of patches.
A more detailed explanation:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment