Skip to content

Instantly share code, notes, and snippets.

@turadg
Forked from sferik/install-ruby-2.0.0.sh
Last active August 9, 2018 06:58
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save turadg/5092528 to your computer and use it in GitHub Desktop.
Save turadg/5092528 to your computer and use it in GitHub Desktop.
Install Ruby 2.0 with Readline and latest OpenSSL
#!/usr/bin/env sh
brew update
# upgrade any that were already installed
brew upgrade rbenv ruby-build readline openssl
# install what's missing
brew install rbenv ruby-build readline openssl
# build with Readline and OpenSSL
env RUBY_CONFIGURE_OPTS=--with-openssl-dir=`brew --prefix openssl` CONFIGURE_OPTS=--with-readline-dir=`brew --prefix readline` rbenv install 2.0.0-p0
# test the SSL
ruby -rnet/https -e "Net::HTTP.get URI('https://github.com')"
# If the above fails, follow this solution
if [ $? -eq 0 ]
then echo 'HTTPS working'
else open http://railsapps.github.com/openssl-certificate-verify-failed.html
fi
@threadhead
Copy link

Trying with ruby-2.0.0-p247 did not work.

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