Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.ruby > #4338 > unrolled thread
| Started by | Martin Hansen <mail@maasha.dk> |
|---|---|
| First post | 2011-05-12 05:59 -0500 |
| Last post | 2011-05-13 06:52 -0500 |
| Articles | 20 on this page of 23 — 5 participants |
Back to article view | Back to comp.lang.ruby
Digest::Base problem Martin Hansen <mail@maasha.dk> - 2011-05-12 05:59 -0500
Re: Digest::Base problem Phillip Gawlowski <cmdjackryan@googlemail.com> - 2011-05-12 06:29 -0500
Re: Digest::Base problem Martin Hansen <mail@maasha.dk> - 2011-05-12 06:55 -0500
Re: Digest::Base problem Phillip Gawlowski <cmdjackryan@googlemail.com> - 2011-05-12 07:14 -0500
Re: Digest::Base problem Martin Hansen <mail@maasha.dk> - 2011-05-12 07:45 -0500
Re: Digest::Base problem Phillip Gawlowski <cmdjackryan@googlemail.com> - 2011-05-12 07:53 -0500
Re: Digest::Base problem Martin Hansen <mail@maasha.dk> - 2011-05-12 08:02 -0500
Re: Digest::Base problem Phillip Gawlowski <cmdjackryan@googlemail.com> - 2011-05-12 08:25 -0500
Re: Digest::Base problem Martin Hansen <mail@maasha.dk> - 2011-05-12 08:36 -0500
Re: Digest::Base problem Phillip Gawlowski <cmdjackryan@googlemail.com> - 2011-05-12 08:43 -0500
Re: Digest::Base problem Martin Hansen <mail@maasha.dk> - 2011-05-12 08:57 -0500
Re: Digest::Base problem brabuhr@gmail.com - 2011-05-12 08:07 -0500
Re: Digest::Base problem Martin Hansen <mail@maasha.dk> - 2011-05-12 08:22 -0500
Re: Digest::Base problem brabuhr@gmail.com - 2011-05-12 09:15 -0500
Re: Digest::Base problem brabuhr@gmail.com - 2011-05-12 09:26 -0500
Re: Digest::Base problem Martin Hansen <mail@maasha.dk> - 2011-05-12 09:39 -0500
Re: Digest::Base problem Phillip Gawlowski <cmdjackryan@googlemail.com> - 2011-05-12 09:52 -0500
Re: Digest::Base problem Linda Metcalfe <lmetcalfe@connextions.com> - 2011-05-12 10:06 -0500
Re: Digest::Base problem Martin Hansen <mail@maasha.dk> - 2011-05-12 10:19 -0500
Re: Digest::Base problem brabuhr@gmail.com - 2011-05-12 10:58 -0500
Re: Digest::Base problem Brian Candler <b.candler@pobox.com> - 2011-05-13 03:17 -0500
Re: Digest::Base problem Martin Hansen <mail@maasha.dk> - 2011-05-13 06:23 -0500
Re: Digest::Base problem Martin Hansen <mail@maasha.dk> - 2011-05-13 06:52 -0500
Page 1 of 2 [1] 2 Next page →
| From | Martin Hansen <mail@maasha.dk> |
|---|---|
| Date | 2011-05-12 05:59 -0500 |
| Subject | Digest::Base problem |
| Message-ID | <c5e6bb4c0827e040374c5f9747b50b73@ruby-forum.com> |
I have the following problem:
maasha@mel:~$ irb
irb(main):001:0> require 'digest'
=> true
irb(main):002:0> Digest::Base
NameError: uninitialized constant Digest::Base
from (irb):2
from /usr/bin/irb:12:in `<main>'
Apparently, there is something wrong my Ruby compilation.
I have compiled Ruby 1.9.1 and 1.9.2 on Mac, Ubuntu, and Redhat. Same
result. I suspect a missing dependency that don't raise the alarm.
Suggestions?
Martin
--
Posted via http://www.ruby-forum.com/.
[toc] | [next] | [standalone]
| From | Phillip Gawlowski <cmdjackryan@googlemail.com> |
|---|---|
| Date | 2011-05-12 06:29 -0500 |
| Message-ID | <BANLkTimaijzrVsbA+h=hWOPg8C2AEjfbkw@mail.gmail.com> |
| In reply to | #4338 |
On Thu, May 12, 2011 at 12:59 PM, Martin Hansen <mail@maasha.dk> wrote: > I have the following problem: > > maasha@mel:~$ irb > irb(main):001:0> require 'digest' > => true > irb(main):002:0> Digest::Base > NameError: uninitialized constant Digest::Base > from (irb):2 > from /usr/bin/irb:12:in `<main>' > > > Apparently, there is something wrong my Ruby compilation. > > I have compiled Ruby 1.9.1 and 1.9.2 on Mac, Ubuntu, and Redhat. Same > result. I suspect a missing dependency that don't raise the alarm. Do you have OpenSSL devel packages installed? Are they found by ./configure? -- Phillip Gawlowski Though the folk I have met, (Ah, how soon!) they forget When I've moved on to some other place, There may be one or two, When I've played and passed through, Who'll remember my song or my face.
[toc] | [prev] | [next] | [standalone]
| From | Martin Hansen <mail@maasha.dk> |
|---|---|
| Date | 2011-05-12 06:55 -0500 |
| Message-ID | <44e6eed427046cccdb19c01bb85b6906@ruby-forum.com> |
| In reply to | #4343 |
> Do you have OpenSSL devel packages installed? Are they found by > ./configure? It doesn't look like configure do anything ssl - should it? maasha@maxwell:~/Install/src/ruby-1.9.2-p180$ ./configure | grep -i ssl This is what's installed sslwise: maasha@maxwell:~/Install/src/ruby-1.9.2-p180$ dpkg -l | grep -i ssl ii libcurl4-openssl-dev 7.18.2-8lenny4 Development files and documentation for libc ii libssl-dev 0.9.8g-15+lenny11 SSL development libraries, header files and ii libssl0.9.8 0.9.8g-15+lenny11 SSL shared libraries ii openssl 0.9.8g-15+lenny11 Secure Socket Layer (SSL) binary and related ii openssl-blacklist 0.4.2 list of blacklisted OpenSSL RSA keys ii ssl-cert 1.0.23 simple debconf wrapper for OpenSSL Martin -- Posted via http://www.ruby-forum.com/.
[toc] | [prev] | [next] | [standalone]
| From | Phillip Gawlowski <cmdjackryan@googlemail.com> |
|---|---|
| Date | 2011-05-12 07:14 -0500 |
| Message-ID | <BANLkTikSHm-4PNDt5R2zXby2QXuKSyWxBw@mail.gmail.com> |
| In reply to | #4346 |
On Thu, May 12, 2011 at 1:55 PM, Martin Hansen <mail@maasha.dk> wrote: >> Do you have OpenSSL devel packages installed? Are they found by >> ./configure? > > It doesn't look like configure do anything ssl - should it? Yes. OpenSSL provides the crypto-backend that Ruby uses. /configure --with-openssl=/path/to/shared/library.so should do the trick, though, since you seem to have everything in order, otherwise. -- Phillip Gawlowski Though the folk I have met, (Ah, how soon!) they forget When I've moved on to some other place, There may be one or two, When I've played and passed through, Who'll remember my song or my face.
[toc] | [prev] | [next] | [standalone]
| From | Martin Hansen <mail@maasha.dk> |
|---|---|
| Date | 2011-05-12 07:45 -0500 |
| Message-ID | <5cd36eefaa33f21217f8d18ae36b82ba@ruby-forum.com> |
| In reply to | #4347 |
> Yes. OpenSSL provides the crypto-backend that Ruby uses. > > ./configure --with-openssl=/path/to/shared/library.so I dont get it. First of all configure complains: configure: WARNING: unrecognized options: --with-openssl configure: WARNING: unrecognized options: --with-ssl Second: I have no idea of what path to point to. Third: I tried to manually compile ext/openssl and recompile ext/digest, but still no Digest::Base. Martin -- Posted via http://www.ruby-forum.com/.
[toc] | [prev] | [next] | [standalone]
| From | Phillip Gawlowski <cmdjackryan@googlemail.com> |
|---|---|
| Date | 2011-05-12 07:53 -0500 |
| Message-ID | <BANLkTin4XrjXrj-ephC2Kj6Un-SBegWJ9Q@mail.gmail.com> |
| In reply to | #4350 |
On Thu, May 12, 2011 at 2:45 PM, Martin Hansen <mail@maasha.dk> wrote: >> Yes. OpenSSL provides the crypto-backend that Ruby uses. >> >> ./configure --with-openssl=/path/to/shared/library.so > > I dont get it. First of all configure complains: > > configure: WARNING: unrecognized options: --with-openssl > configure: WARNING: unrecognized options: --with-ssl /configure --help should, well, help. > Second: I have no idea of what path to point to. That's highly specific to your environment, but a "find libssl0.9.8" should help. > Third: I tried to manually compile ext/openssl and recompile ext/digest, > but still no Digest::Base. Yeah, those are stubs (i.e. they don't do anything). There once were export restrictions in the US on almost all cryptography (technically, crypto is a weapon as far as US export law is concerned). -- Phillip Gawlowski Though the folk I have met, (Ah, how soon!) they forget When I've moved on to some other place, There may be one or two, When I've played and passed through, Who'll remember my song or my face.
[toc] | [prev] | [next] | [standalone]
| From | Martin Hansen <mail@maasha.dk> |
|---|---|
| Date | 2011-05-12 08:02 -0500 |
| Message-ID | <b6087a6ced2d19c1ed4cb6ba2861ce49@ruby-forum.com> |
| In reply to | #4351 |
> ./configure --help should, well, help. I dont really see anything: http://pastie.org/1892928 >> Second: I have no idea of what path to point to. > > That's highly specific to your environment, but a "find libssl0.9.8" > should help. Hm, I see now that /usr/lib contains these: /usr/lib/libssl.a /usr/lib/libssl.so /usr/lib/libssl.so.0.9.8 /usr/lib/libssl3.so /usr/lib/libssl3.so.1d But /usr/lib is included per default, right? > Yeah, those are stubs (i.e. they don't do anything). There once were > export restrictions in the US on almost all cryptography (technically, > crypto is a weapon as far as US export law is concerned). Crazy! :o) Martin -- Posted via http://www.ruby-forum.com/.
[toc] | [prev] | [next] | [standalone]
| From | Phillip Gawlowski <cmdjackryan@googlemail.com> |
|---|---|
| Date | 2011-05-12 08:25 -0500 |
| Message-ID | <BANLkTin_dzSELD_g6gZedxtcGx=KDaQyRg@mail.gmail.com> |
| In reply to | #4353 |
On Thu, May 12, 2011 at 3:02 PM, Martin Hansen <mail@maasha.dk> wrote: >> ./configure --help should, well, help. > > I dont really see anything: > > http://pastie.org/1892928 --with-PACKAGE is the correct one, where "PACKAGE" should be replaced with "openssl" (so, adding the path was incorrect information on my part). > But /usr/lib is included per default, right? It should, yes. >> Yeah, those are stubs (i.e. they don't do anything). There once were >> export restrictions in the US on almost all cryptography (technically, >> crypto is a weapon as far as US export law is concerned). > > Crazy! Kinda. In the Bad Old Days nobody wanted to hand strong cryptography to the Soviets. The easiest way was classifying crypto as weapons, instead of creating a new category (since weapons could be traded with NATO partners, obviously). -- Phillip Gawlowski Though the folk I have met, (Ah, how soon!) they forget When I've moved on to some other place, There may be one or two, When I've played and passed through, Who'll remember my song or my face.
[toc] | [prev] | [next] | [standalone]
| From | Martin Hansen <mail@maasha.dk> |
|---|---|
| Date | 2011-05-12 08:36 -0500 |
| Message-ID | <e8969bd0a42b5e0e3b438fa8d0e8a9d9@ruby-forum.com> |
| In reply to | #4357 |
>> http://pastie.org/1892928 > > --with-PACKAGE is the correct one, where "PACKAGE" should be replaced > with "openssl" (so, adding the path was incorrect information on my > part). We already tried this: configure: WARNING: unrecognized options: --with-openssl Same with and without a path, and same for --with-ssl. Can we somehow test if Ruby has SSL support - without using digest - which appears to be broken? Martin -- Posted via http://www.ruby-forum.com/.
[toc] | [prev] | [next] | [standalone]
| From | Phillip Gawlowski <cmdjackryan@googlemail.com> |
|---|---|
| Date | 2011-05-12 08:43 -0500 |
| Message-ID | <BANLkTimEwap6m_gobOdPkGOU2=mn_-iTUw@mail.gmail.com> |
| In reply to | #4359 |
On Thu, May 12, 2011 at 3:36 PM, Martin Hansen <mail@maasha.dk> wrote: > > Can we somehow test if Ruby has SSL support - without using digest - > which appears to be broken? Sure. Try to access a website that uses HTTPS, like so: http://olabini.com/blog/2008/08/ruby-https-web-calls/ -- Phillip Gawlowski Though the folk I have met, (Ah, how soon!) they forget When I've moved on to some other place, There may be one or two, When I've played and passed through, Who'll remember my song or my face.
[toc] | [prev] | [next] | [standalone]
| From | Martin Hansen <mail@maasha.dk> |
|---|---|
| Date | 2011-05-12 08:57 -0500 |
| Message-ID | <519b405eae994c781e4eb36ef2b02b62@ruby-forum.com> |
| In reply to | #4360 |
>> Can we somehow test if Ruby has SSL support - without using digest -
>> which appears to be broken?
>
> Sure. Try to access a website that uses HTTPS, like so:
irb(main):001:0> require 'httpclient'
ArgumentError: undefined class/module Digest::Base
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from
/home/maasha/Install/src/Martin/lib/ruby/gems/1.9.1/gems/httpclient-2.2.0.2/lib/httpclient.rb:11:in
`<top (required)>'
from <internal:lib/rubygems/custom_require>:33:in `require'
from <internal:lib/rubygems/custom_require>:33:in `rescue in
require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from (irb):1
from ./irb:12:in `<main>'
OK, so something ssl is probably fubar. It is strange that it appears to
be a problem with both the precompiled debian packages and my ruby
do-it-yourself compile.
Grrr. I need some systematic approach to track down this issue.
Martin
--
Posted via http://www.ruby-forum.com/.
[toc] | [prev] | [next] | [standalone]
| From | brabuhr@gmail.com |
|---|---|
| Date | 2011-05-12 08:07 -0500 |
| Message-ID | <BANLkTinbg0MibV7DnUCpD3fZ5j1gn0Omiw@mail.gmail.com> |
| In reply to | #4338 |
On Thu, May 12, 2011 at 6:59 AM, Martin Hansen <mail@maasha.dk> wrote: > I have the following problem: > > NameError: uninitialized constant Digest::Base > > Apparently, there is something wrong my Ruby compilation. Indeed :-) > I have compiled Ruby 1.9.1 and 1.9.2 on Mac, Ubuntu, and Redhat. Same > result. I suspect a missing dependency that don't raise the alarm. Ubuntu: apt-get install libssl-dev Red Hat: yum install openssl-devel Mac: are you using a "ports" system?
[toc] | [prev] | [next] | [standalone]
| From | Martin Hansen <mail@maasha.dk> |
|---|---|
| Date | 2011-05-12 08:22 -0500 |
| Message-ID | <b3b15c55b8d6accfa273fa5cf2eed2f5@ruby-forum.com> |
| In reply to | #4354 |
> Ubuntu: apt-get install libssl-dev Already there: maasha@maxwell:~/Install/src/ruby-1.9.2-p180$ dpkg -l | grep libssl ii libssl-dev 0.9.8g-15+lenny11 SSL development libraries, header files and ii libssl0.9.8 0.9.8g-15+lenny11 SSL shared libraries > Mac: are you using a "ports" system? Yes, openssl @1.0.0d (devel, security) is installed I am beginning to suspect that ssl is not the problem. openssl and libssl and libssl-dev is installed on all systems. There is no options to select alternative paths to libssl in Ruby's configure script. Digest::Base does not work with neither my compilations of ruby1.9.1 and ruby1.9.2 OR with the precompiled Ruby1.9 Debian and Ubuntu packages. :o( - what then? Martin -- Posted via http://www.ruby-forum.com/.
[toc] | [prev] | [next] | [standalone]
| From | brabuhr@gmail.com |
|---|---|
| Date | 2011-05-12 09:15 -0500 |
| Message-ID | <BANLkTinGqo8gwYLjjKQ_NU51UZG5ub3U=A@mail.gmail.com> |
| In reply to | #4356 |
On Thu, May 12, 2011 at 9:22 AM, Martin Hansen <mail@maasha.dk> wrote: > Digest::Base does not work with neither my compilations of ruby1.9.1 and > ruby1.9.2 OR with the precompiled Ruby1.9 Debian and Ubuntu packages. Debian package: apt-get install libopenssl-ruby1.9
[toc] | [prev] | [next] | [standalone]
| From | brabuhr@gmail.com |
|---|---|
| Date | 2011-05-12 09:26 -0500 |
| Message-ID | <BANLkTinWzhaUmks0qkfC9s=MvO5XBZUwFA@mail.gmail.com> |
| In reply to | #4364 |
On Thu, May 12, 2011 at 10:15 AM, <brabuhr@gmail.com> wrote: > On Thu, May 12, 2011 at 9:22 AM, Martin Hansen <mail@maasha.dk> wrote: >> Digest::Base does not work with neither my compilations of ruby1.9.1 and >> ruby1.9.2 OR with the precompiled Ruby1.9 Debian and Ubuntu packages. > > Debian package: apt-get install libopenssl-ruby1.9 (Though I thought this step was no longer necessary?) What versions of debian/ubuntu/redhat? You could also try RVM (after installing the -dev[el] packages).
[toc] | [prev] | [next] | [standalone]
| From | Martin Hansen <mail@maasha.dk> |
|---|---|
| Date | 2011-05-12 09:39 -0500 |
| Message-ID | <413b5c0650b6f849cf2ce0df51f0b708@ruby-forum.com> |
| In reply to | #4367 |
>> Debian package: apt-get install libopenssl-ruby1.9 I tested with the precompiled libopenssl-ruby1.9.1 and the precompiled ruby1.9.1 from Ubuntu. Still no Digest::Base. > What versions of debian/ubuntu/redhat? Ubuntu 10.04.2 LTS uname -a Linux bixeonws 2.6.32-31-server #61-Ubuntu SMP Fri Apr 8 19:44:42 UTC 2011 x86_64 GNU/Linux Debian 5.0.8 uname -a Linux maxwell 2.6.31.5 #1 SMP Fri Nov 6 17:07:54 CET 2009 x86_64 GNU/Linux And my Mac -> snoleopard. > You could also try RVM (after installing the -dev[el] packages). No idea what this does. I would like to simply compile my own ruby and have it working. :o| Martin -- Posted via http://www.ruby-forum.com/.
[toc] | [prev] | [next] | [standalone]
| From | Phillip Gawlowski <cmdjackryan@googlemail.com> |
|---|---|
| Date | 2011-05-12 09:52 -0500 |
| Message-ID | <BANLkTimZ2c414ty1u_JhCN4Tkp=Q7+va3g@mail.gmail.com> |
| In reply to | #4368 |
On Thu, May 12, 2011 at 4:39 PM, Martin Hansen <mail@maasha.dk> wrote: > >> You could also try RVM (after installing the -dev[el] packages). > > No idea what this does. I would like to simply compile my own ruby and > have it working. https://rvm.beginrescueend.com/ It grabs source code for Ruby implementations, and compiles it. -- Phillip Gawlowski Though the folk I have met, (Ah, how soon!) they forget When I've moved on to some other place, There may be one or two, When I've played and passed through, Who'll remember my song or my face.
[toc] | [prev] | [next] | [standalone]
| From | Linda Metcalfe <lmetcalfe@connextions.com> |
|---|---|
| Date | 2011-05-12 10:06 -0500 |
| Message-ID | <baf53793644281c2b454bbe6740c5f2b@ruby-forum.com> |
| In reply to | #4370 |
Phillip Gawlowski wrote in post #998249: > On Thu, May 12, 2011 at 4:39 PM, Martin Hansen <mail@maasha.dk> wrote: >> >>> You could also try RVM (after installing the -dev[el] packages). >> >> No idea what this does. I would like to simply compile my own ruby and >> have it working. > > https://rvm.beginrescueend.com/ > > It grabs source code for Ruby implementations, and compiles it. > > -- > Phillip Gawlowski > > Though the folk I have met, > (Ah, how soon!) they forget > When I've moved on to some other place, > There may be one or two, > When I've played and passed through, > Who'll remember my song or my face. I've used this link for installing RVM on Ubuntu, it's very well-written and easy to follow. http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you -- Posted via http://www.ruby-forum.com/.
[toc] | [prev] | [next] | [standalone]
| From | Martin Hansen <mail@maasha.dk> |
|---|---|
| Date | 2011-05-12 10:19 -0500 |
| Message-ID | <b96b85b7bdec3b873663061e3180284e@ruby-forum.com> |
| In reply to | #4373 |
>> https://rvm.beginrescueend.com/ >> >> It grabs source code for Ruby implementations, and compiles it. I think, that I want to get my ruby working the "old fashioned" way before going fancy. ruby -rdigest -e "p Digest.const_defined? :Base" => true I get false on three different systems. Just tested on my office mate's mac where it returns 'true' (though ruby 1.8.7). Could it be a problem with old libs sitting around? Bleh :o( Martin -- Posted via http://www.ruby-forum.com/.
[toc] | [prev] | [next] | [standalone]
| From | brabuhr@gmail.com |
|---|---|
| Date | 2011-05-12 10:58 -0500 |
| Message-ID | <BANLkTim+16ZMSGKBe5Rzc3qB0EKhZ2hPNQ@mail.gmail.com> |
| In reply to | #4368 |
On Thu, May 12, 2011 at 10:39 AM, Martin Hansen <mail@maasha.dk> wrote: >> What versions of debian/ubuntu/redhat? > > Ubuntu 10.04.2 LTS > uname -a > Linux bixeonws 2.6.32-31-server #61-Ubuntu SMP Fri Apr 8 19:44:42 UTC > 2011 x86_64 GNU/Linux > > Debian 5.0.8 > uname -a > Linux maxwell 2.6.31.5 #1 SMP Fri Nov 6 17:07:54 CET 2009 x86_64 > GNU/Linux x86_64, all of ruby and ssl and ssl-dev are x86_64? >> Debian package: apt-get install libopenssl-ruby1.9 > > I tested with the precompiled libopenssl-ruby1.9.1 and the precompiled > ruby1.9.1 from Ubuntu. Still no Digest::Base. http://packages.ubuntu.com/lucid/amd64/libopenssl-ruby1.9.1/filelist On a 32-bit Ubuntu 11.04 (all I have handy right now): $ ldd /usr/lib/ruby/1.9.1/i686-linux/openssl.so linux-gate.so.1 => (0x007d1000) libruby-1.9.1.so.1.9 => /usr/lib/libruby-1.9.1.so.1.9 (0x00a6b000) libssl.so.0.9.8 => /lib/libssl.so.0.9.8 (0x004f1000) libcrypto.so.0.9.8 => /lib/libcrypto.so.0.9.8 (0x00e52000) libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0x00619000) librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0x00110000) libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0x00e01000) libcrypt.so.1 => /lib/i386-linux-gnu/libcrypt.so.1 (0x00367000) libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0x00119000) libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0x0013f000) /lib/ld-linux.so.2 (0x0066b000) libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0x005de000)
[toc] | [prev] | [next] | [standalone]
Page 1 of 2 [1] 2 Next page →
Back to top | Article view | comp.lang.ruby
csiph-web