Ruby SSL_read: tlsv1 alert protocol version

I'm writing a simple ssl web client which worked fine without adding ssl support. Now that I have added ssl functionality to get request I get this error message:

SSL_read: tlsv1 alert protocol version

After googling about it, I came to conclusion to check openssl version, which I can see that it supports TLSv1.2. I even created a context to explicitly forcing tlsv1.2 but still same error message. My openssl version: