Mar
04
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)
sudo apt-get install gcc make
Step 2
Install the system level OpenSSL and dev libraries
sudo apt-get install openssl libssl-dev
Step 3
Install the ruby’s openssl interface to the system’s openssl
switch the directory to the ruby’s source code’s openssl
cd /usr/local/src/ruby1.8.6/ext/openssl
install the ruby’s openssl interface
sudo ruby extconf.rb make make install
try requiring the openssl in irb
require 'openssl'
if returns true, installed successfully!


or, rather, use apt-get install libopenssl-ruby