Sunday, February 10, 2013

SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed

1. Install GCC Installer https://github.com/kennethreitz/osx-gcc-installer
2.

rvm remove 1.9.3
brew install openssl
rvm install 1.9.3 --with-openssl-dir=`brew --prefix openssl`


# Install openssl
echo "Install openssl..."
brew install openssl
brew link openssl
# download cert.pem file for openssl
cd /usr/local/etc/openssl/certs/
sudo curl -O http://curl.haxx.se/ca/cacert.pem
sudo mv cacert.pem cert.pem
cd -
echo "
# cert.pem file for openssl 
export SSL_CERT_FILE=/usr/local/etc/openssl/certs/cert.pem" >> ~/.bash_profile
source ~/.bash_profile

Shell script to turn your laptop to a development machine.