Skip to content

Instantly share code, notes, and snippets.

@thoolihan
Last active May 1, 2021 10:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save thoolihan/11234055 to your computer and use it in GitHub Desktop.
Save thoolihan/11234055 to your computer and use it in GitHub Desktop.
script to make sure you have rcodetools installed for all rvm rubies
#!/usr/bin/env ruby
rubies = `rvm list`.split(/\s+/).find_all{|s| s.include? "ruby"}
def fetch_for(rvm_spec)
system "rvm use #{rvm_spec}"
system "gem install rcodetools"
end
def valid_gemset?(name)
!(name.include?("(default)") or
name.include?("global") or
name.empty?)
end
rubies.each do |rb|
fetch_for rb
gemsets = `rvm gemset list`.split(/\s+/).find_all{|s| valid_gemset?(s)}
gemsets.each do |gemset|
fetch_for "#{rb}@#{gemset}"
end
end
@thoolihan
Copy link
Author

has some bugs to work out...

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