Installing the openssl on CentOS

Hi, all

Please look my error message ,

$ which openssl
/usr/bin/openssl
$ whereis openssl
openssl: /usr/bin/openssl /usr/lib/openssl
/usr/share/man/man1/openssl.1ssl.gz
$ openssl version
OpenSSL 1.0.0-fips 29 Mar 2010

$ irb
irb(main):001:0> require ‘openssl’
LoadError: no such file to load – openssl
from
/usr/local/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
require' from /usr/local/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:inrequire’
from (irb):1
from /usr/local/ruby/bin/irb:12:in `’

So, what should i do now ?
How do use the openssl in ruby ?

On Sep 7, 9:21am, coolesting [email protected] wrote:

OpenSSL 1.0.0-fips 29 Mar 2010
from (irb):1
from /usr/local/ruby/bin/irb:12:in `’

So, what should i do now ?
How do use the openssl in ruby ?

So you’ve got the openssl library but not the openssl bindings for
ruby. In some environments (e.g. debian) those bindings are a separate
package from the main ruby packages. If you compiled ruby yourself
(completely by hand or via rvm or similar) then you either didn’t have
openssl installed at the time or didn’t have the openssl development
headers (usually installable as a separate package)

Fred

Thanks

yum install openssl-devel.i686 openssl.i686

cd /path/to/ruby_install_package/ext/openssl/

ruby extconf.rb --with–openssl=/usr/bin/openssl

–with–openssl-lib=/usr/lib/openssl

make && make install

It works for me on CentOS, hoping this helps others.