# How to make ruby1.8.7 work with openssl 0.9.8?

**URL:** <https://www.ruby-forum.com/t/how-to-make-ruby1-8-7-work-with-openssl-0-9-8/179739>\
**Category:** Rails\
**Created:** [December 2, 2009, 11:32pm UTC](https://www.ruby-forum.com/t/how-to-make-ruby1-8-7-work-with-openssl-0-9-8/179739 "2009-12-02T23:32:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![captaffy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f04885/32.png) [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Post date:** [December 2, 2009, 11:32pm UTC](https://www.ruby-forum.com/t/how-to-make-ruby1-8-7-work-with-openssl-0-9-8/179739/1 "2009-12-02T23:32:59Z")

</div>

I have been trying to get this work for several hours without success.

I am trying to use Ruby Amazon AWS lib with requires use of the new  
version of openssl.

My macbook tiger comes with built-in openssl 0.9.7i, so I installed  
openssl 0.9.8l via macport.

When I issue the following command, it get to the new version:

$ openssl version  
OpenSSL 0.9.8l 5 Nov 2009

But when I call openssl within ruby, it keeps looking at the older  
version:

$ irb  
irb(main):001:0\> require ‘openssl’  
=\> true  
irb(main):002:0\> OpenSSL::OPENSSL\_VERSION  
=\> “OpenSSL 0.9.7i 14 Oct 2005”

I have tried recompiling ruby, but it didn’t help.

Anyone knows how to fix the problem?

Thanks!

John

---

<div class="post-metadata">

**Author:** ![captaffy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f04885/32.png) [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Post date:** [December 3, 2009, 3:40am UTC](https://www.ruby-forum.com/t/how-to-make-ruby1-8-7-work-with-openssl-0-9-8/179739/2 "2009-12-03T03:40:03Z")

</div>

I finally got it working. Thanks for Jonny Rogers and his posting:

[https://www.ruby-forum.com/topic/195793#871284](https://www.ruby-forum.com/topic/195793#871284)

That got me thinking in the right direction:

1. First of all, make sure install the new version of openssl before  
compiling ruby

2. Then when you compile ruby, tell where your openssl installation so  
the complete steps of ruby install will look like this:

curl -O ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p160.tar.gz  
tar xzvf ruby-1.8.7-p160.tar.gz  
cd ruby-1.8.7-p160  
./configure --prefix=/usr/local --enable-pthread  
–with-readline-dir=/usr/local --with-openssl-dir=/opt/local  
–enable-shared  
make  
sudo make install
