Forum: Ruby openssl error - ubuntu

E41ff53614fcbf599d07b0d55bd18269?d=identicon&s=25 Chad (Guest)
on 2006-12-02 13:17
(Received via mailing list)
Help!

Why do I continually get the following error?

------------------------------------------------------------
irb(main):001:0> require 'openssl'
LoadError: no such file to load -- openssl
        from (irb):1:in `require'
        from (irb):1
------------------------------------------------------------

I've tried everything in every post about this.  I've blown away my
ruby install like 6 times.  How do I get ruby to recognize openssl?

I've installed:

ubuntu
ruby 1.8.5
libopenssl-ruby
libzlib-ruby
libyaml-ruby
libdrb-ruby
liberb-ruby
zlib1g-dev


Any suggestions?

Thank you,
Chad
230aaa9511e64e8c7e18783b7b839c43?d=identicon&s=25 Jose francisco Gonzalez carmona (jfglez)
on 2006-12-02 13:46
do you have 'openssl' installed? try to install, libssl0.9.8 or highet
and libssl-dev.

jflez.

Chad wrote:
> Help!
>
> Why do I continually get the following error?
>
> ------------------------------------------------------------
> irb(main):001:0> require 'openssl'
> LoadError: no such file to load -- openssl
>         from (irb):1:in `require'
>         from (irb):1
> ------------------------------------------------------------
>
> I've tried everything in every post about this.  I've blown away my
> ruby install like 6 times.  How do I get ruby to recognize openssl?
>
> I've installed:
>
> ubuntu
> ruby 1.8.5
> libopenssl-ruby
> libzlib-ruby
> libyaml-ruby
> libdrb-ruby
> liberb-ruby
> zlib1g-dev
>
>
> Any suggestions?
>
> Thank you,
> Chad
E41ff53614fcbf599d07b0d55bd18269?d=identicon&s=25 Chad (Guest)
on 2006-12-02 20:12
(Received via mailing list)
Absolutely... I'm not a linux expert though, but I have a feeling
they're installing somewhere that ruby can't see them.  What can I do
to ensure apt-get is behaving properly?


See below:

[/root] # apt-get install openssl
Reading package lists... Done
Building dependency tree
Reading state information... Done
openssl is already the newest version.

[/root] # apt-get install libssl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libssl-dev is already the newest version.


Thank you,
Chad




On Dec 2, 4:46 am, Jose francisco Gonzalez carmona
<pgonza...@naupacto.com> wrote:
> do you have 'openssl' installed? try to install, libssl0.9.8 or highet
> and libssl-dev.
>
> jflez.
>
E41ff53614fcbf599d07b0d55bd18269?d=identicon&s=25 Chad (Guest)
on 2006-12-03 00:35
(Received via mailing list)
I finally figured it out.

I cleaned out all the current openssl files, then took the ruby 1.8.5
source, went into the ruby-1.8.5/ext/openssl directory and created the
openssl make file:

ruby extconf.rb
make
make install

and that fiiiiinally but the libraries where they should go.
703fbc991fd63e0e1db54dca9ea31b53?d=identicon&s=25 Robert Dober (Guest)
on 2006-12-03 16:28
(Received via mailing list)
On 12/3/06, Chad <carimura@gmail.com> wrote:
>
> and that fiiiiinally but the libraries where they should go.


Thanks for sharing, I have tried about  1 week to get it going, without
success!!!

Cheers
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
5e076aff3eebe97b3dfad44727f2770a?d=identicon&s=25 Gaius Centus Novus (gcnovus)
on 2007-04-07 06:38
I've followed this, and I'm still stuck.

I've done the following:
sudo apt-get install openssl
sudo apt-get install libssl-dev
sudo apt-get install libssl0.9.8

gone into /ext/openssl/ and run
ruby extconf.rb
cd ../..
make
make install

At least now all those commands work without failing to find openssl.
Still, though, running irb and calling "require 'openssl'" yeilds the
very frustrating "no such file to load -- libssl"

What else am I forgetting to check?

-Gaius

Robert Dober wrote:
> On 12/3/06, Chad <carimura@gmail.com> wrote:
>>
>> and that fiiiiinally but the libraries where they should go.
>
>
> Thanks for sharing, I have tried about  1 week to get it going, without
> success!!!
>
> Cheers
> 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
5e076aff3eebe97b3dfad44727f2770a?d=identicon&s=25 Gaius Centus Novus (gcnovus)
on 2007-04-07 06:44
I solved my own problem: the make and make install should be run from
the ext/openssl/ directory (and it's fine if there's "nothing to do for
make").

-Gaius
Ed7e9cf3114e3a6b9982a4dbb7ff9c8e?d=identicon&s=25 Rod Mclaughlin (pdxrod)
on 2008-05-15 18:03
Thanks for all the help. The full story of how I installed Rails can be
found in
http://forum.eeeuser.com/viewtopic.php?pid=257583#p257583
http://forum.eeeuser.com/viewtopic.php?pid=257583

Gaius Centus Novus wrote:
> I solved my own problem: the make and make install should be run from
> the ext/openssl/ directory (and it's fine if there's "nothing to do for
> make").
>
> -Gaius
F1ae87d23c050dbad815489dbde2f226?d=identicon&s=25 Prasad G. (gdprasad)
on 2008-06-11 15:15
Chad wrote:
> I finally figured it out.
>
> I cleaned out all the current openssl files, then took the ruby 1.8.5
> source, went into the ruby-1.8.5/ext/openssl directory and created the
> openssl make file:
>
> ruby extconf.rb
> make
> make install
>
> and that fiiiiinally but the libraries where they should go.

This information helped me when I was struggling with this problem
today.
I registed  into this forum , immediately, only to thank you.

Prasad
58e271d88e22fe26f9cbf0dd31252c0f?d=identicon&s=25 James George (jameschacks)
on 2008-06-19 11:50
Thanks a lot pal, it worked perfectly for me too. I had the same openssl
problem on a new ubuntu server box. Thanks for the tip.


Chad wrote:
> I finally figured it out.
>
> I cleaned out all the current openssl files, then took the ruby 1.8.5
> source, went into the ruby-1.8.5/ext/openssl directory and created the
> openssl make file:
>
> ruby extconf.rb
> make
> make install
>
> and that fiiiiinally but the libraries where they should go.
4828d528e2e46f7c8160c336eb332836?d=identicon&s=25 Robert Heiler (shevegen)
on 2008-06-19 16:20
So much for distribution's package managers making your life easier,
huh? ;-)
F267dbf0d0d9d0648f2956a19e7caf92?d=identicon&s=25 Lucas Nussbaum (Guest)
on 2008-06-20 09:50
(Received via mailing list)
On 19/06/08 at 23:18 +0900, Marc Heiler wrote:
> So much for distribution's package managers making your life easier,
> huh? ;-)

I don't think anybody reported a bug about that to Ubuntu or Debian. And
Ubuntu just imports the Ruby packages from Debian.

Also, it works perfectly fine here. On a clean Debian install:
apt-get install ruby libopenssl-ruby ; ruby -e 'require "openssl"'
doesn't raise any error.

If you can still reproduce this, I would be interested in the outputs of
"dpkg -l | grep ruby" and "dpkg -L libopenssl-ruby1.8" on your system.
F1ae87d23c050dbad815489dbde2f226?d=identicon&s=25 Prasad G. (gdprasad)
on 2008-06-22 20:14
(Received via mailing list)
On Fri, Jun 20, 2008 at 1:18 PM, Lucas Nussbaum
<lucas@lucas-nussbaum.net>
wrote:

>
> If you can still reproduce this, I would be interested in the outputs of
> "dpkg -l | grep ruby" and "dpkg -L libopenssl-ruby1.8" on your system.
> --
> | Lucas Nussbaum
> | lucas@lucas-nussbaum.net   http://www.lucas-nussbaum.net/ |
> | jabber: lucas@nussbaum.fr             GPG: 1024D/023B3F4F |
>
> If I rememer right, 'require "openssl"' raised an error when I compiled
from source of ruby-1.8.6 or ruby-1.8.7 after Ubuntu-8.04 fresh install.

I did not try the ruby package.

Prasad
2981f105e4cf06b4c553b8de4c8040a6?d=identicon&s=25 Nate Wiger (nwiger)
on 2008-08-28 19:30
This worked for me:

1) Compile SSL from scratch

2) Make note of the install location, shown as
/where/you/installed/openssl below

3) Use the earlier instruction (above) to manually create the extension:

cd ext/openssl
../../ruby extconf.rb
--with-openssl-include=/where/you/installed/openssl/include
--with-openssl-lib=/where/you/installed/openssl
LD_RUN_PATH=/where/you/installed/openssl/lib make
make install

I'm not sure the LD_RUN_PATH is needed, but I've had problems with Ruby
before so included it to be safe.

-Nate
9e9445fbc375bba0bd57bfc54b4d0acc?d=identicon&s=25 Amar Eis (amareis)
on 2008-12-24 08:15
Nate Wiger wrote:
> This worked for me:
>
> 1) Compile SSL from scratch
>
> 2) Make note of the install location, shown as
> /where/you/installed/openssl below
>
> 3) Use the earlier instruction (above) to manually create the extension:
>
> cd ext/openssl
> ../../ruby extconf.rb
> --with-openssl-include=/where/you/installed/openssl/include
> --with-openssl-lib=/where/you/installed/openssl
> LD_RUN_PATH=/where/you/installed/openssl/lib make
> make install
>
> I'm not sure the LD_RUN_PATH is needed, but I've had problems with Ruby
> before so included it to be safe.
>
> -Nate


What does this error message on my blog mean?
I've posted my blog on a site (houseblogs.net). If you go to the blog
address directly, it comes up fine. But if you click on it from
houseblogs.net you get this message:
The requested URL /community/extensions/Blogs/greybox/0 was not found on
this server.
Additionally, a 404 Not Found error was encountered while trying to use
an ErrorDocument to handle the request.
Apache/2.0.61 (Unix) mod_ssl/2.0.61 OpenSSL/0.9.8b mod_bwlimited/1.4
FrontPage/5.0.2.2635 mod_auth_passthrough/2.1 PHP/5.2.4 Server at
www.houseblogs.net Port 80
3481ab8aa0f32a612c03ecd510769cd9?d=identicon&s=25 David Knoernschild (dknoern)
on 2009-03-20 23:43
If you'd rather not build form source, just do this (it worked for me on
Intrepid):

sudo apt-get install libopenssl-ruby


and then try again.



Amar Eis wrote:
> Nate Wiger wrote:
>> This worked for me:
>>
>> 1) Compile SSL from scratch
>>
>> 2) Make note of the install location, shown as
>> /where/you/installed/openssl below
>>
>> 3) Use the earlier instruction (above) to manually create the extension:
>>
>> cd ext/openssl
>> ../../ruby extconf.rb
>> --with-openssl-include=/where/you/installed/openssl/include
>> --with-openssl-lib=/where/you/installed/openssl
>> LD_RUN_PATH=/where/you/installed/openssl/lib make
>> make install
>>
>> I'm not sure the LD_RUN_PATH is needed, but I've had problems with Ruby
>> before so included it to be safe.
>>
>> -Nate
>
>
> What does this error message on my blog mean?
> I've posted my blog on a site (houseblogs.net). If you go to the blog
> address directly, it comes up fine. But if you click on it from
> houseblogs.net you get this message:
> The requested URL /community/extensions/Blogs/greybox/0 was not found on
> this server.
> Additionally, a 404 Not Found error was encountered while trying to use
> an ErrorDocument to handle the request.
> Apache/2.0.61 (Unix) mod_ssl/2.0.61 OpenSSL/0.9.8b mod_bwlimited/1.4
> FrontPage/5.0.2.2635 mod_auth_passthrough/2.1 PHP/5.2.4 Server at
> www.houseblogs.net Port 80
C8a6229300cb4a1bb56120d9b4f0d1b7?d=identicon&s=25 James Calfee (jcalfee)
on 2010-01-07 01:15
Worked for me, libopenssl-ruby was the missing package.

David Knoernschild wrote:
>
> If you'd rather not build form source, just do this (it worked for me on
> Intrepid):
>
> sudo apt-get install libopenssl-ruby
>
>
> and then try again.
>
7668603f79c76f21ae9be4e7069c01e0?d=identicon&s=25 Roberto Felloni (fellons)
on 2010-01-08 19:50
I to all.

I'm new for the forum,
and not many able with linux e ruby,
but I'm on IT from many years.

I've read your discussion (and many other) ...
I have the same problem ....
"no such file to load -- openssl"
with ruby /script/server

I've installed ruby-1.9.1-p376 (without openssl) on a
vmware ubuntu 8.04 virtual machine.

For what I've understand, our suggests works fine
on ruby 1.8 / 1.9,
but for 1.9.1 I've not found anything.

Installing openssl, libssl-dev or libopenssl-ruby1.9
on my filesystem was created .../ruby/1.9.0,
but my ruby are on /ruby/1.9.1 !!

How I can download ruby1.9.1 with /ext subdir ...
or how I can integrate with openssl my ruby1.9.1.

Sorry for my english ...
and for my stupid question :(

I hope my question are understandable.

fellons
8e44b211865cd5915f2f883fd960b56d?d=identicon&s=25 Xeno Campanoli (Guest)
on 2010-01-08 19:57
(Received via mailing list)
Roberto Felloni wrote:
> I to all.

This may not address your concerns at all, but something we found out
last year
is that Debian / Ubuntu Server adopt GNUTLS for some facilities as
opposed to
OpenSSL, which has some implications for some things like behaviors with
adoptions of certificates that are self-signed, or not signed by
canonical
sources.  OpenLDAP was the one we were seeing this on.  It worked with
internal
certs on CentOS, but not on Ubuntu Server, which uses GNUTLS instead of
OpenSSL
for this.

xc
A4e17f895c60ea54a1bd18dcac4df649?d=identicon&s=25 Jonathan Nielsen (Guest)
on 2010-01-08 19:58
(Received via mailing list)
On Fri, Jan 8, 2010 at 11:50 AM, Roberto Felloni
<roberto.felloni@gmail.com> wrote:
> How I can download ruby1.9.1 with /ext subdir ...
> or how I can integrate with openssl my ruby1.9.1.

Recompile and reinstall ruby 1.9.1 with the libssl-dev package
installed, and you might want to synchronize your system time with
'sudo ntpdate ntp.ubuntu.com' before compiling... I've had it refuse
to compile the openssl extension due to a skewed clock before.

Good luck...

-Jonathan Nielsen
F267dbf0d0d9d0648f2956a19e7caf92?d=identicon&s=25 Lucas Nussbaum (Guest)
on 2010-01-08 23:17
(Received via mailing list)
On 09/01/10 at 03:50 +0900, Roberto Felloni wrote:
> Installing openssl, libssl-dev or libopenssl-ruby1.9
> on my filesystem was created .../ruby/1.9.0,
> but my ruby are on /ruby/1.9.1 !!

Install libopenssl-ruby1.9.1.
A4e17f895c60ea54a1bd18dcac4df649?d=identicon&s=25 Jonathan Nielsen (Guest)
on 2010-01-08 23:49
(Received via mailing list)
On Fri, Jan 8, 2010 at 3:16 PM, Lucas Nussbaum
<lucas@lucas-nussbaum.net> wrote:
>
> Install libopenssl-ruby1.9.1.

Works on Ubuntu Karmic and better, but this is 8.04 (Hardy), you need
to compile ruby 1.9.1 from source on these older versions of Ubuntu

-Jonathan Nielsen
7668603f79c76f21ae9be4e7069c01e0?d=identicon&s=25 Roberto Felloni (fellons)
on 2010-01-09 08:20
Hi.
Many thanks to all.
I've solved to recompile src ruby1.9.1 after
installation of libssl-dev, openssl and libssl0.9.8

I've compiled with that params:
--with-openssl-dir, --with-readline-dir, --with-zlib-dir

During compilation I receveid a warning : params unrecognized,
but now webrick start.

bye
6386fca4c4f8b41183a678c6fd831b79?d=identicon&s=25 David S. (david_s)
on 2010-12-25 21:36
Chad wrote in post #175543:
> I finally figured it out.
>
> I cleaned out all the current openssl files, then took the ruby 1.8.5
> source, went into the ruby-1.8.5/ext/openssl directory and created the
> openssl make file:
>
> ruby extconf.rb
> make
> make install
>
> and that fiiiiinally but the libraries where they should go.

Chad: thank you for your help. I was create a rails project tickets.

I got this error " no such file to load - openssl" when I load my rails
page:
http://localhost:3000/tickets

Your solution solved my problem.
6cbf3b88588a51550cff3d48c4fff570?d=identicon&s=25 Carles M. (carles_m)
on 2011-09-15 14:42
If you are using rvm (ruby version manager) you need to do nexts steps:

rvm pkg install openssl
rvm remove 1.9.2
rvm install 1.9.2 --with-openssl-dir=$HOME/.rvm/usr
1be7f6d072af0b287aa7bb76ae8aade9?d=identicon&s=25 Dhaval Parikh (dhaval_parikh33)
on 2011-12-01 11:58
60230d68bfdf3fc7affddab0ce362d01?d=identicon&s=25 Simon R. (simon_r)
on 2013-06-25 17:33
> I cleaned out all the current openssl files, then took the ruby 1.8.5
> source, went into the ruby-1.8.5/ext/openssl directory and created the
> openssl make file:
>
> ruby extconf.rb
> make
> make install

When building from source I do as much as possible as an ordinary user -
you only need to be root to do the install, so I use sudo to do that
part as root:

ruby extconf.rb
make
sudo make install

While installing rails 4.0.0 on top of ruby 2.0.0 I had the problem
discussed in this thread.  The above fix worked but then I got a similar
error because zlib was missing.  As well as the openssl package, there's
a zlib package in the ext directory which you build in the same way:

cd ../zlib
ruby extconf.rb
make
sudo make install
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.