e x p r e s s i c a

ruby on rails, business and technicalities

No public Twitter messages.

  • RSS
  • Facebook
  • Twitter
  • Linkedin

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 install

try requiring the openssl in irb

  require 'openssl'

if returns true, installed successfully!

2 Responses so far.

  1. Reza says:

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

  2. Flavio says:

    Thank you! This worked great for me on rhel5.