If you have installed ruby using apt-get or if you have not mentioned the configuration option for openssl while installing from source, you can expect openssl will not work with ruby.
Here is the solution for the same…
Step 1
Install gcc and make(if you don’t have already on your box)
Step 2
Install the system level OpenSSL and dev libraries
Step 3
Install the ruby’s openssl interface to the system’s openssl
switch the directory to the ruby’s source code’s openssl
install the ruby’s openssl interface
try requiring the openssl in irb
if returns true, installed successfully!
