Last active
August 29, 2015 14:02
-
-
Save adarsh/ebb2f44de62d13104f22 to your computer and use it in GitHub Desktop.
Update OpenSSL using Homebrew, then uninstall and re-install all of your rbenv-managed rubies
This file contains hidden or 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
class RubyRefresher | |
def install | |
`brew update && brew upgrade openssl` | |
rubies.each do |version| | |
unless /system/.match(version) | |
`rbenv uninstall #{version}` | |
`rbenv install #{version}` | |
end | |
end | |
end | |
private | |
def rubies | |
rbenv_versions.split(/\r\n|\n/) | |
end | |
def rbenv_versions | |
`rbenv versions` | |
end | |
end | |
RubyRefresher.new.install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment