Created
February 13, 2017 21:00
-
-
Save henderea/25671bfbe2e16b5a54010c576e260d36 to your computer and use it in GitHub Desktop.
Should fix the openssl errors for an rvm-installed ruby on macOS Sierra
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
#!/bin/sh | |
# Pass the ruby versions to fix as arguments. For example, | |
# $ ./fix_ruby_openssl.sh 2.4.0 2.3.1 2.2.5 | |
for rv in "$@" | |
do | |
echo rvm uninstall "$rv" | |
rvm uninstall "$rv" | |
done | |
echo rvm get head | |
rvm get head | |
echo rvm cleanup all | |
rvm cleanup all | |
echo rvm autolibs homebrew | |
rvm autolibs homebrew | |
echo brew update | |
brew update | |
echo brew reinstall openssl | |
brew reinstall openssl | |
OSSL_DIR="$(brew --cellar)/openssl/$(brew ls --versions openssl | awk '{print $2;}')/" | |
for rv in "$@" | |
do | |
echo rvm install "$rv" "--with-openssl-dir=$OSSL_DIR" | |
rvm install "$rv" "--with-openssl-dir=$OSSL_DIR" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment