Skip to content

Instantly share code, notes, and snippets.

@adarsh
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adarsh/ebb2f44de62d13104f22 to your computer and use it in GitHub Desktop.
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
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