Openssl on Red Hat not installed

So I'm one of the unlucky ones that don't have openssl properly
installed in ruby. I am running red hat. Some info:

`require': no such file to load -- openssl (LoadError)

[root@lnn607 ~]# rpm -qa|grep -i openssl
pyOpenSSL-0.6-1.p23
xmlsec1-openssl-1.2.6-3
openssl-0.9.7a-43.14

I tried to install all kinds veriations of package names with yum, such
as libopenssl, openssl-src, ruby-openssl, ruby-libopenssl etc etc, nut
couldnt find any.
I then downloaded the libopenssl-ruby source files (which actually are
for debian i think) and copied the .rb files into
/usr/local/lib/ruby/1.8, but then it complained that it cannot find
openssl.so.
So how do I get the openssl source files installed so that it works in
ruby?

Thanks for any help!

···

--
Posted via http://www.ruby-forum.com/.

I then downloaded the libopenssl-ruby source files (which actually are
for debian i think) and copied the .rb files into
/usr/local/lib/ruby/1.8, but then it complained that it cannot find
openssl.so.
So how do I get the openssl source files installed so that it works in
ruby?

Look for a package named openssl-dev or openssl-devel
and install them.
These contain the necessary C header files for Ruby to link against
the Openssl libs.
Hope that helps,

                        UG

···

---
Uma Geller

Hueen Hueen írta:

So I'm one of the unlucky ones that don't have openssl properly
installed in ruby. I am running red hat. Some info:
  

I have a similar problem on my Ubuntu Dapper box:

>> require 'openssl'
=> false

despite I have all the ruby libs and libssl stuff installed.

Szab

Look at the thread form Dec 3
HTH
Robert

···

--
"The real romance is out ahead and yet to come. The computer revolution
hasn't started yet. Don't be misled by the enormous flow of money into bad
defacto standards for unsophisticated buyers using poor adaptations of
incomplete ideas."

- Alan Kay

# 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.

···

--
Posted via http://www.ruby-forum.com/.

I have a similar problem on my Ubuntu Dapper box:
>> require 'openssl'
=> false

do you have rubygems installed ?
I think I recall the default behavior of require would change when
using rubygems on certain platforms.

···

---
Uma Geller

Parragh Szabolcs wrote:

Hueen Hueen �rta:

So I'm one of the unlucky ones that don't have openssl properly
installed in ruby. I am running red hat. Some info:
  

I have a similar problem on my Ubuntu Dapper box:

>> require 'openssl'
=> false

despite I have all the ruby libs and libssl stuff installed.

Szab

have you tried
sudo apt-get install libopenssl-ruby
?

···

--
Posted via http://www.ruby-forum.com/\.

Parragh Szabolcs wrote:

Hueen Hueen írta:

So I'm one of the unlucky ones that don't have openssl properly
installed in ruby. I am running red hat. Some info:
  

I have a similar problem on my Ubuntu Dapper box:

>> require 'openssl'
=> false

despite I have all the ruby libs and libssl stuff installed.

Szab

This clearly needs to be an FAQ: When require returns false that means that the required library has already been loaded. It does not mean that require failed. When require fails it raises LoadError.

Uma Geller wrote:

Look for a package named openssl-dev or openssl-devel
and install them.
These contain the necessary C header files for Ruby to link against
the Openssl libs.

almost there.

yum did find openssl-devel, but could not satisfy the zlib dependancy.
needs 1.1.4, my installed version was too new. rpm -i --force did the
job and openssl-devel installed successfully.
on the ruby side i have to do everything manually. copied the openssl
ruby files as well as openssl.so into /usr/lib/ruby/1.8

now i can start my script, but at some point it fails:

/usr/local/lib/ruby/1.8/net/protocol.rb:66:in `closed?': undefined
method `closed?' for #<OpenSSL::SSL::SSLSocket:0xb7e35474>
(NoMethodError)

does that mean my net/protocol.rb is outdated? yum tells me i have the
newest ruby version installed
ruby 1.8.5 (2006-12-04 patchlevel 2) [i686-linux]

any ideas?

···

--
Posted via http://www.ruby-forum.com/\.

Sorry posts just crossed each other, you are beyond the point where this
thread will be helpfull now.
My lucky day :frowning:
Sorry for the noise
R

···

On 12/20/06, Robert Dober <robert.dober@gmail.com> wrote:

Look at the thread form Dec 3
HTH
Robert

--
"The real romance is out ahead and yet to come. The computer revolution
hasn't started yet. Don't be misled by the enormous flow of money into bad
defacto standards for unsophisticated buyers using poor adaptations of
incomplete ideas."

- Alan Kay

--
"The real romance is out ahead and yet to come. The computer revolution
hasn't started yet. Don't be misled by the enormous flow of money into bad
defacto standards for unsophisticated buyers using poor adaptations of
incomplete ideas."

- Alan Kay

Uma Geller írta:

I have a similar problem on my Ubuntu Dapper box:
>> require 'openssl'
=> false

do you have rubygems installed ?
I think I recall the default behavior of require would change when
using rubygems on certain platforms.

Yes, but ruby openssl was installed not by gem but by the libopenssl-ruby package.

···

---
Uma Geller
http://umageller.wordpress.com

--
Parragh Szabolcs
e-mail: parragh@dayka.hu
web: parszab.nir.hu

Hueen írta:

Parragh Szabolcs wrote:
  

Hueen Hueen ?rta:
    

So I'm one of the unlucky ones that don't have openssl properly
installed in ruby. I am running red hat. Some info:
  

I have a similar problem on my Ubuntu Dapper box:

>> require 'openssl'
=> false

despite I have all the ruby libs and libssl stuff installed.

Szab
    
have you tried
sudo apt-get install libopenssl-ruby
?
  

Sure:)) I have the /usr/lib/ruby/1.8/openssl.rb file properly installed.

···

--
Parragh Szabolcs
e-mail: parragh@dayka.hu
web: parszab.nir.hu

Timothy Hunter írta:

This clearly needs to be an FAQ: When require returns false that means that the required library has already been loaded. It does not mean that require failed. When require fails it raises LoadError.

Oh, geez, sure -- sorry, it's way too late too work!:slight_smile:

···

--
Parragh Szabolcs
e-mail: parragh@dayka.hu
web: parszab.nir.hu

err.. why do i have everything twice at
/usr/local/lib/ruby/1.8
AND
/usr/lib/ruby/1.8/

? is it supposed to be like this?

···

--
Posted via http://www.ruby-forum.com/.

Robert Dober wrote:

···

On 12/20/06, Robert Dober <robert.dober@gmail.com> wrote:

incomplete ideas."

- Alan Kay

Sorry posts just crossed each other, you are beyond the point where this
thread will be helpfull now.
My lucky day :frowning:
Sorry for the noise
R

--
"The real romance is out ahead and yet to come. The computer revolution
hasn't started yet. Don't be misled by the enormous flow of money into
bad
defacto standards for unsophisticated buyers using poor adaptations of
incomplete ideas."

- Alan Kay

? what thread, link please?

--
Posted via http://www.ruby-forum.com/\.

Hueen wrote:

? what thread, link please?

got it

worked for me, problem solved.
thanks for your help guys.

···

--
Posted via http://www.ruby-forum.com/\.

risk to become a valuable member of the community than :slight_smile:

Cheers
Robert

···

On 12/20/06, Hueen <hueen@yahoo.com> wrote:

   Hueen wrote:
> ? what thread, link please?

got it
Openssl error - ubuntu - Ruby - Ruby-Forum
worked for me, problem solved.
thanks for your help guys.

--
Posted via http://www.ruby-forum.com/\.

Seems my posts are most valuable when I am completely confused, well I

--
"The real romance is out ahead and yet to come. The computer revolution
hasn't started yet. Don't be misled by the enormous flow of money into bad
defacto standards for unsophisticated buyers using poor adaptations of
incomplete ideas."

- Alan Kay