Backport #5786
closedLoadError: cannot load such file -- openssl
Added by znz (Kazuhiro NISHIYAMA) over 12 years ago. Updated about 12 years ago.
Description
openssl がビルドされていないと test-all で LoadError: cannot load such file -- openssl になっていくつかエラーになります。
途中で Ctrl+C で止めてしまっているのでもっと出るのかもしれません。
test_cgi_session_filestore(CGISessionTest):
LoadError: cannot load such file -- openssl
.../ruby/lib/securerandom.rb:59:in random_bytes' .../ruby/lib/securerandom.rb:140:in
hex'
.../ruby/lib/cgi/session.rb:173:in create_new_id' .../ruby/lib/cgi/session.rb:267:in
initialize'
.../ruby/test/cgi/test_cgi_session.rb:33:in new' .../ruby/test/cgi/test_cgi_session.rb:33:in
test_cgi_session_filestore'
-
Error:
test_cgi_session_pstore(CGISessionTest):
LoadError: cannot load such file -- openssl
.../ruby/lib/securerandom.rb:59:inrandom_bytes' .../ruby/lib/securerandom.rb:140:in
hex'
.../ruby/lib/cgi/session.rb:173:increate_new_id' .../ruby/lib/cgi/session.rb:267:in
initialize'
.../ruby/test/cgi/test_cgi_session.rb:71:innew' .../ruby/test/cgi/test_cgi_session.rb:71:in
test_cgi_session_pstore' -
Error:
test_cgi_session_specify_session_key(CGISessionTest):
LoadError: cannot load such file -- openssl
.../ruby/lib/securerandom.rb:59:inrandom_bytes' .../ruby/lib/securerandom.rb:140:in
hex'
.../ruby/lib/cgi/session.rb:173:increate_new_id' .../ruby/lib/cgi/session.rb:267:in
initialize'
.../ruby/test/cgi/test_cgi_session.rb:148:innew' .../ruby/test/cgi/test_cgi_session.rb:148:in
test_cgi_session_specify_session_key' -
Error:
test_https_proxy_authentication(HTTPSProxyTest):
LoadError: cannot load such file -- openssl
.../ruby/test/net/http/test_https_proxy.rb:16:in `block (2 levels) in test_https_proxy_authentication' -
Error:
test_ssl_socket_close_on_post_connection_check_fail(Net::TestSSLSocket):
LoadError: cannot load such file -- openssl
.../ruby/lib/net/smtp.rb:197:indefault_ssl_context' .../ruby/lib/net/smtp.rb:345:in
enable_starttls_auto'
.../ruby/test/net/smtp/test_ssl_socket.rb:51:in `test_ssl_socket_close_on_post_connection_check_fail' -
Error:
test_ssl_socket_open_on_post_connection_check_success(Net::TestSSLSocket):
LoadError: cannot load such file -- openssl
.../ruby/lib/net/smtp.rb:197:indefault_ssl_context' .../ruby/lib/net/smtp.rb:345:in
enable_starttls_auto'
.../ruby/test/net/smtp/test_ssl_socket.rb:67:in `test_ssl_socket_open_on_post_connection_check_success'
Files
signature.asc (499 Bytes) signature.asc | Anonymous, 12/27/2011 07:53 PM |
Updated by znz (Kazuhiro NISHIYAMA) over 12 years ago
% git grep -n 'autoload.*openssl'
lib/net/http.rb:24:autoload :OpenSSL, 'openssl'
%
で autoload が設定されていて、
lib/securerandom.rb:59: if defined? OpenSSL::Random
の defined? で LoadError になってしまうのが原因のようです。
autoload と defined? の組み合わせは以下のようにバージョン毎に微妙に挙動が違うようです。
% cat /tmp/test.rb
autoload :OpenSSL, 'openssl'
p defined?(OpenSSL)
p defined?(OpenSSL::Random)
% ./ruby -v /tmp/test.rb
ruby 1.8.7 (2011-12-10 patchlevel 356) [x86_64-linux]
"constant"
"constant"
% cd $(\ls -1d /home/chkbuild/tmp/build/ruby-1.9.2/|tail -n1)/bin
% ./ruby -v /tmp/test.rb
ruby 1.9.2p312 (2011-12-18 revision 34062) [x86_64-linux]
nil
nil
% cd $(\ls -1d /home/chkbuild/tmp/build/ruby-1.9.3/|tail -n1)/bin
% ./ruby -v /tmp/test.rb
ruby 1.9.3p6 (2011-12-20 revision 34080) [x86_64-linux]
"constant"
"constant"
% cd $(\ls -1d /home/chkbuild/tmp/build/ruby-trunk/*|tail -n1)/bin
% ./ruby -v /tmp/test.rb
ruby 2.0.0dev (2011-12-21 trunk 34088) [x86_64-linux]
"constant"
"constant"
%
Updated by nahi (Hiroshi Nakamura) over 12 years ago
- ruby -v changed from ruby 2.0.0dev (2011-12-21 trunk 34091) [x86_64-linux] to -
On Thu, Dec 22, 2011 at 00:32, Kazuhiro NISHIYAMA redmine@ruby-lang.org wrote:
% git grep -n 'autoload.*openssl'
lib/net/http.rb:24:autoload :OpenSSL, 'openssl'
%
で autoload が設定されていて、
lib/securerandom.rb:59: if defined? OpenSSL::Random
の defined? で LoadError になってしまうのが原因のようです。
なるほどー。いいバグですねえ。net/http.rbがOpenSSLをautoloadにしているので、net/http.rb経由でOpenSSLを触るテストは落ちるし、securerandom.rbもif
defined? OpenSSL::RandomのOpenSSL定数アクセスで落ちてしまう、ということでしょうか。
で、どうしますかね。opensslなしでもテスト通ったほうがいい?
autoload と defined? の組み合わせは以下のようにバージョン毎に微妙に挙動が違うようです。
詳しく見てませんが、opensslがインストールしてあるかどうかの差だったりします?
==
For Martin (emboss): He said he got test failures when ossl was not
built. net/http.rb defined autoload for OpenSSL so tests that depend
net/http.rb would try to load openssl via OpenSSL access then fail.
Tests that depend securerandom.rb also fails by 'if defined?
OpenSSL::Random', too. Also, 'if defined? OpenSSL' guards in
test/openssl would not work as expected.
Anyways, it's not the bug of ossl but of the build system, and not severe.
Updated by MartinBosslet (Martin Bosslet) over 12 years ago
That's so nice of you to translate, thank you! Please let me know if and how I can help!
Updated by kosaki (Motohiro KOSAKI) over 12 years ago
ええと。
ちゃんと読んでないのですが僕の理解が正しければ、 if defined? OpenSSL を使うのをやめて、テストの最初で require 'openssl' してみて例外投げてきたらスキップとかすればいい?
Updated by nobu (Nobuyoshi Nakada) over 12 years ago
なかだです。
(11/12/22 0:32), Kazuhiro NISHIYAMA wrote:
% git grep -n 'autoload.*openssl'
lib/net/http.rb:24:autoload :OpenSSL, 'openssl'
%
で autoload が設定されていて、
lib/securerandom.rb:59: if defined? OpenSSL::Random
の defined? で LoadError になってしまうのが原因のようです。
autoload と defined? の組み合わせは以下のようにバージョン毎に微妙に挙動が違うようです。% cat /tmp/test.rb
autoload :OpenSSL, 'openssl'
p defined?(OpenSSL)
p defined?(OpenSSL::Random)
% ./ruby -v /tmp/test.rb
ruby 1.8.7 (2011-12-10 patchlevel 356) [x86_64-linux]
"constant"
"constant"
% cd $(\ls -1d /home/chkbuild/tmp/build/ruby-1.9.2/|tail -n1)/bin
% ./ruby -v /tmp/test.rb
ruby 1.9.2p312 (2011-12-18 revision 34062) [x86_64-linux]
nil
nil
% cd $(\ls -1d /home/chkbuild/tmp/build/ruby-1.9.3/|tail -n1)/bin
% ./ruby -v /tmp/test.rb
ruby 1.9.3p6 (2011-12-20 revision 34080) [x86_64-linux]
"constant"
"constant"
% cd $(\ls -1d /home/chkbuild/tmp/build/ruby-trunk/*|tail -n1)/bin
% ./ruby -v /tmp/test.rb
ruby 2.0.0dev (2011-12-21 trunk 34088) [x86_64-linux]
"constant"
"constant"
これは、1.9からautoloadされる定数がdefined?でnilになるというバグがあっ
たので1.9.3で直したのですが、そのときに定数のdefined?で例外が起きないと
いう(1.9.0で導入された誤った)仮定にそぐわなくなったためです。おそらく最
右辺以外の定数参照にISEQ_TYPE_DEFINED_GUARDを付ける必要があるのではない
かと思います。
--
--- 僕の前にBugはない。
--- 僕の後ろにBugはできる。
中田 伸悦
Updated by Anonymous over 12 years ago
(2011/12/22 10:18), Nobuyoshi Nakada wrote:
これは、1.9からautoloadされる定数がdefined?でnilになるというバグがあっ
たので1.9.3で直したのですが、そのときに定数のdefined?で例外が起きないと
いう(1.9.0で導入された誤った)仮定にそぐわなくなったためです。おそらく最
右辺以外の定数参照にISEQ_TYPE_DEFINED_GUARDを付ける必要があるのではない
かと思います。
いまひとつ中田さんが書かれていることを理解しきれていませんが、
defined?(A::B) は、普通にAの定数参照をして、Aがautoloadだったらそれも解
決しちゃう、ということでいいですよね?
= 2.0.0dev
% cat autoload_defined.rb
autoload :OpenSSL, 'openssl'
p defined?(OpenSSL)
p $LOADED_FEATURES.grep(/openssl/).empty?
p defined?(OpenSSL::Random)
p $LOADED_FEATURES.grep(/openssl/).empty?
% ruby -v autoload_defined.rb
ruby 2.0.0dev (2011-12-26 trunk 34138) [x86_64-linux]
"constant"
true
"constant"
false
= 1.9.3
% ruby -v autoload_defined.rb
ruby 1.9.3p6 (2011-12-15 revision 34049) [x86_64-linux]
"constant"
true
"constant"
false
= 1.9.2
% ruby -v autoload_defined.rb
ruby 1.9.2p312 (2011-08-11 revision 32926) [x86_64-linux]
nil
true
nil
true
= 1.8.7
% ruby187 -v autoload_defined.rb
ruby 1.8.7 (2011-12-10 patchlevel 356) [x86_64-linux]
"constant"
true
"constant"
false
1.9.3で、1.8と同じ挙動になった、と。
Updated by nobu (Nobuyoshi Nakada) over 12 years ago
なかだです。
(11/12/27 19:39), Hiroshi Nakamura wrote:
(2011/12/22 10:18), Nobuyoshi Nakada wrote:
これは、1.9からautoloadされる定数がdefined?でnilになるというバグがあっ
たので1.9.3で直したのですが、そのときに定数のdefined?で例外が起きないと
いう(1.9.0で導入された誤った)仮定にそぐわなくなったためです。おそらく最
右辺以外の定数参照にISEQ_TYPE_DEFINED_GUARDを付ける必要があるのではない
かと思います。いまひとつ中田さんが書かれていることを理解しきれていませんが、
defined?(A::B) は、普通にAの定数参照をして、Aがautoloadだったらそれも解
決しちゃう、ということでいいですよね?
そうなります。
1.9.3で、1.8と同じ挙動になった、と。
ただし、Aの解決時に例外が起きても無視しなくなっているという違いが残って
います。具体的には、defined?(raise::A)が1.8まではnilになるのに対して、
1.9以降では例外になります。
--
--- 僕の前にBugはない。
--- 僕の後ろにBugはできる。
中田 伸悦
Updated by Anonymous over 12 years ago
(2011/12/27 21:22), Nobuyoshi Nakada wrote:
ただし、Aの解決時に例外が起きても無視しなくなっているという違いが残って
います。具体的には、defined?(raise::A)が1.8まではnilになるのに対して、
1.9以降では例外になります。
やっと理解しました。
% ruby187 -e 'defined?(raise::Foo)'
% ruby -e 'defined?(raise::Foo)'
-e:1:in `': unhandled exception
元に戻ると、
if defined? OpenSSL::Random
は、OpenSSLという定数が存在していなくても、例えば
if defined? NO_SUCH_CONST::FOO::BAR
等と同様、例外を上げたりしないことを期待しているということですね。
securerandom.rb絡みのテスト失敗は、これを直せばなくなるとして、net/http
やnet/smtpのテストはどうしましょうかね。
Updated by znz (Kazuhiro NISHIYAMA) about 12 years ago
- Target version set to 2.0.0
- ruby -v changed from - to ruby 2.0.0dev (2012-02-03 trunk 34424) [x86_64-linux]
r34421 にコミットした場当たり的な対処でとりあえず止まることはなくなりましたが、
1 failures, 33 errors です。
-
Failure:
test_install_security_policy(TestGemDependencyInstaller) [.../ruby/test/rubygems/test_gem_dependency_installer.rb:524]:
--- expected
+++ actual
@@ -1 +1 @@
-"Unsigned gem"
+"SSL is not installed on this system" -
Error:
test_class_sign_cert(TestGemSecurity):
LoadError: cannot load such file -- openssl
.../ruby/test/rubygems/test_gem_security.rb:62:in `test_class_sign_cert' -
Error:
test_cgi_session_specify_session_key(CGISessionTest):
LoadError: cannot load such file -- openssl
.../ruby/lib/securerandom.rb:59:inrandom_bytes' .../ruby/lib/securerandom.rb:140:in
hex'
.../ruby/lib/cgi/session.rb:173:increate_new_id' .../ruby/lib/cgi/session.rb:267:in
initialize'
.../ruby/test/cgi/test_cgi_session.rb:148:innew' .../ruby/test/cgi/test_cgi_session.rb:148:in
test_cgi_session_specify_session_key' -
Error:
test_ssl_socket_close_on_post_connection_check_fail(Net::TestSSLSocket):
LoadError: cannot load such file -- openssl
.../ruby/lib/net/smtp.rb:197:indefault_ssl_context' .../ruby/lib/net/smtp.rb:345:in
enable_starttls_auto'
.../ruby/test/net/smtp/test_ssl_socket.rb:51:in `test_ssl_socket_close_on_post_connection_check_fail' -
Error:
test_ssl_socket_open_on_post_connection_check_success(Net::TestSSLSocket):
LoadError: cannot load such file -- openssl
.../ruby/lib/net/smtp.rb:197:indefault_ssl_context' .../ruby/lib/net/smtp.rb:345:in
enable_starttls_auto'
.../ruby/test/net/smtp/test_ssl_socket.rb:67:in `test_ssl_socket_open_on_post_connection_check_success' -
Error:
test_execute_private_key(TestGemCommandsCertCommand):
LoadError: cannot load such file -- openssl
.../ruby/lib/rubygems/commands/cert_command.rb:67:inblock in initialize' .../ruby/lib/rubygems/command.rb:445:in
call'
.../ruby/lib/rubygems/command.rb:445:inblock (2 levels) in configure_options' .../ruby/lib/optparse.rb:1360:in
call'
.../ruby/lib/optparse.rb:1360:inblock in parse_in_order' .../ruby/lib/optparse.rb:1347:in
catch'
.../ruby/lib/optparse.rb:1347:inparse_in_order' .../ruby/lib/optparse.rb:1341:in
order!'
.../ruby/lib/optparse.rb:1432:inpermute!' .../ruby/lib/optparse.rb:1453:in
parse!'
.../ruby/lib/rubygems/command.rb:348:inhandle_options' .../ruby/test/rubygems/test_gem_commands_cert_command.rb:90:in
block in test_execute_private_key'
.../ruby/lib/rubygems/user_interaction.rb:40:inuse_ui' .../ruby/lib/rubygems/user_interaction.rb:63:in
use_ui'
.../ruby/test/rubygems/test_gem_commands_cert_command.rb:89:in `test_execute_private_key' -
Error:
test_execute_remove(TestGemCommandsCertCommand):
LoadError: cannot load such file -- openssl
.../ruby/lib/rubygems/commands/cert_command.rb:43:inrescue in block (2 levels) in initialize' .../ruby/lib/rubygems/commands/cert_command.rb:37:in
block (2 levels) in initialize'
.../ruby/lib/rubygems/commands/cert_command.rb:36:inglob' .../ruby/lib/rubygems/commands/cert_command.rb:36:in
block in initialize'
.../ruby/lib/rubygems/command.rb:445:incall' .../ruby/lib/rubygems/command.rb:445:in
block (2 levels) in configure_options'
.../ruby/lib/optparse.rb:1360:incall' .../ruby/lib/optparse.rb:1360:in
block in parse_in_order'
.../ruby/lib/optparse.rb:1347:incatch' .../ruby/lib/optparse.rb:1347:in
parse_in_order'
.../ruby/lib/optparse.rb:1341:inorder!' .../ruby/lib/optparse.rb:1432:in
permute!'
.../ruby/lib/optparse.rb:1453:inparse!' .../ruby/lib/rubygems/command.rb:348:in
handle_options'
.../ruby/test/rubygems/test_gem_commands_cert_command.rb:102:inblock in test_execute_remove' .../ruby/lib/rubygems/user_interaction.rb:40:in
use_ui'
.../ruby/lib/rubygems/user_interaction.rb:63:inuse_ui' .../ruby/test/rubygems/test_gem_commands_cert_command.rb:101:in
test_execute_remove' -
Error:
test_execute_list(TestGemCommandsCertCommand):
LoadError: cannot load such file -- openssl
.../ruby/lib/rubygems/commands/cert_command.rb:24:inrescue in block (2 levels) in initialize' .../ruby/lib/rubygems/commands/cert_command.rb:20:in
block (2 levels) in initialize'
.../ruby/lib/rubygems/commands/cert_command.rb:19:inglob' .../ruby/lib/rubygems/commands/cert_command.rb:19:in
block in initialize'
.../ruby/lib/rubygems/command.rb:445:incall' .../ruby/lib/rubygems/command.rb:445:in
block (2 levels) in configure_options'
.../ruby/lib/optparse.rb:1360:incall' .../ruby/lib/optparse.rb:1360:in
block in parse_in_order'
.../ruby/lib/optparse.rb:1347:incatch' .../ruby/lib/optparse.rb:1347:in
parse_in_order'
.../ruby/lib/optparse.rb:1341:inorder!' .../ruby/lib/optparse.rb:1432:in
permute!'
.../ruby/lib/optparse.rb:1453:inparse!' .../ruby/lib/rubygems/command.rb:348:in
handle_options'
.../ruby/test/rubygems/test_gem_commands_cert_command.rb:81:inblock in test_execute_list' .../ruby/lib/rubygems/user_interaction.rb:40:in
use_ui'
.../ruby/lib/rubygems/user_interaction.rb:63:inuse_ui' .../ruby/test/rubygems/test_gem_commands_cert_command.rb:80:in
test_execute_list' -
Error:
test_execute_certificate(TestGemCommandsCertCommand):
LoadError: cannot load such file -- openssl
.../ruby/lib/rubygems/commands/cert_command.rb:61:inblock in initialize' .../ruby/lib/rubygems/command.rb:445:in
call'
.../ruby/lib/rubygems/command.rb:445:inblock (2 levels) in configure_options' .../ruby/lib/optparse.rb:1360:in
call'
.../ruby/lib/optparse.rb:1360:inblock in parse_in_order' .../ruby/lib/optparse.rb:1347:in
catch'
.../ruby/lib/optparse.rb:1347:inparse_in_order' .../ruby/lib/optparse.rb:1341:in
order!'
.../ruby/lib/optparse.rb:1432:inpermute!' .../ruby/lib/optparse.rb:1453:in
parse!'
.../ruby/lib/rubygems/command.rb:348:inhandle_options' .../ruby/test/rubygems/test_gem_commands_cert_command.rb:69:in
block in test_execute_certificate'
.../ruby/lib/rubygems/user_interaction.rb:40:inuse_ui' .../ruby/lib/rubygems/user_interaction.rb:63:in
use_ui'
.../ruby/test/rubygems/test_gem_commands_cert_command.rb:68:in `test_execute_certificate' -
Error:
test_execute_sign(TestGemCommandsCertCommand):
LoadError: cannot load such file -- openssl
.../ruby/lib/rubygems/commands/cert_command.rb:67:inblock in initialize' .../ruby/lib/rubygems/command.rb:445:in
call'
.../ruby/lib/rubygems/command.rb:445:inblock (2 levels) in configure_options' .../ruby/lib/optparse.rb:1391:in
call'
.../ruby/lib/optparse.rb:1391:inblock in parse_in_order' .../ruby/lib/optparse.rb:1347:in
catch'
.../ruby/lib/optparse.rb:1347:inparse_in_order' .../ruby/lib/optparse.rb:1341:in
order!'
.../ruby/lib/optparse.rb:1432:inpermute!' .../ruby/lib/optparse.rb:1453:in
parse!'
.../ruby/lib/rubygems/command.rb:348:inhandle_options' .../ruby/test/rubygems/test_gem_commands_cert_command.rb:113:in
block in test_execute_sign'
.../ruby/lib/rubygems/user_interaction.rb:40:inuse_ui' .../ruby/lib/rubygems/user_interaction.rb:63:in
use_ui'
.../ruby/test/rubygems/test_gem_commands_cert_command.rb:112:in `test_execute_sign' -
Error:
test_execute_build(TestGemCommandsCertCommand):
Gem::Exception: SSL is not installed on this system
.../ruby/lib/rubygems/gem_openssl.rb:33:inensure_ssl_available' .../ruby/lib/rubygems/security.rb:705:in
build_self_signed_cert'
.../ruby/lib/rubygems/commands/cert_command.rb:52:inblock in initialize' .../ruby/lib/rubygems/command.rb:445:in
call'
.../ruby/lib/rubygems/command.rb:445:inblock (2 levels) in configure_options' .../ruby/lib/optparse.rb:1360:in
call'
.../ruby/lib/optparse.rb:1360:inblock in parse_in_order' .../ruby/lib/optparse.rb:1347:in
catch'
.../ruby/lib/optparse.rb:1347:inparse_in_order' .../ruby/lib/optparse.rb:1341:in
order!'
.../ruby/lib/optparse.rb:1432:inpermute!' .../ruby/lib/optparse.rb:1453:in
parse!'
.../ruby/lib/rubygems/command.rb:348:inhandle_options' .../ruby/test/rubygems/test_gem_commands_cert_command.rb:49:in
block (2 levels) in test_execute_build'
.../ruby/test/rubygems/test_gem_commands_cert_command.rb:48:inchdir' .../ruby/test/rubygems/test_gem_commands_cert_command.rb:48:in
block in test_execute_build'
.../ruby/lib/rubygems/user_interaction.rb:40:inuse_ui' .../ruby/lib/rubygems/user_interaction.rb:63:in
use_ui'
.../ruby/test/rubygems/test_gem_commands_cert_command.rb:47:in `test_execute_build' -
Error:
test_execute_add(TestGemCommandsCertCommand):
LoadError: cannot load such file -- openssl
.../ruby/lib/rubygems/commands/cert_command.rb:11:inblock in initialize' .../ruby/lib/rubygems/command.rb:445:in
call'
.../ruby/lib/rubygems/command.rb:445:inblock (2 levels) in configure_options' .../ruby/lib/optparse.rb:1360:in
call'
.../ruby/lib/optparse.rb:1360:inblock in parse_in_order' .../ruby/lib/optparse.rb:1347:in
catch'
.../ruby/lib/optparse.rb:1347:inparse_in_order' .../ruby/lib/optparse.rb:1341:in
order!'
.../ruby/lib/optparse.rb:1432:inpermute!' .../ruby/lib/optparse.rb:1453:in
parse!'
.../ruby/lib/rubygems/command.rb:348:inhandle_options' .../ruby/test/rubygems/test_gem_commands_cert_command.rb:36:in
block in test_execute_add'
.../ruby/lib/rubygems/user_interaction.rb:40:inuse_ui' .../ruby/lib/rubygems/user_interaction.rb:63:in
use_ui'
.../ruby/test/rubygems/test_gem_commands_cert_command.rb:35:in `test_execute_add' -
Error:
test_cgi_session_filestore(CGISessionTest):
LoadError: cannot load such file -- openssl
.../ruby/lib/securerandom.rb:59:inrandom_bytes' .../ruby/lib/securerandom.rb:140:in
hex'
.../ruby/lib/cgi/session.rb:173:increate_new_id' .../ruby/lib/cgi/session.rb:267:in
initialize'
.../ruby/test/cgi/test_cgi_session.rb:33:innew' .../ruby/test/cgi/test_cgi_session.rb:33:in
test_cgi_session_filestore' -
Error:
test_self_open_signed(TestGemPackageTarOutput):
Gem::Exception: SSL is not installed on this system
.../ruby/lib/rubygems/gem_openssl.rb:33:inensure_ssl_available' .../ruby/lib/rubygems/security.rb:792:in
initialize'
.../ruby/test/rubygems/test_gem_package_tar_output.rb:56:innew' .../ruby/test/rubygems/test_gem_package_tar_output.rb:56:in
test_self_open_signed' -
Error:
test_class_email_to_name(TestGemSecurity):
LoadError: cannot load such file -- openssl
.../ruby/lib/rubygems/security.rb:755:inemail_to_name' .../ruby/test/rubygems/test_gem_security.rb:79:in
test_class_email_to_name' -
Error:
test_class_build_self_signed_cert(TestGemSecurity):
Gem::Exception: SSL is not installed on this system
.../ruby/lib/rubygems/gem_openssl.rb:33:inensure_ssl_available' .../ruby/lib/rubygems/security.rb:705:in
build_self_signed_cert'
.../ruby/test/rubygems/test_gem_security.rb:49:in `test_class_build_self_signed_cert' -
Error:
test_class_build_cert(TestGemSecurity):
LoadError: cannot load such file -- openssl
.../ruby/test/rubygems/test_gem_security.rb:8:in `test_class_build_cert' -
Error:
test_cgi_session_pstore(CGISessionTest):
LoadError: cannot load such file -- openssl
.../ruby/lib/securerandom.rb:59:inrandom_bytes' .../ruby/lib/securerandom.rb:140:in
hex'
.../ruby/lib/cgi/session.rb:173:increate_new_id' .../ruby/lib/cgi/session.rb:267:in
initialize'
.../ruby/test/cgi/test_cgi_session.rb:71:innew' .../ruby/test/cgi/test_cgi_session.rb:71:in
test_cgi_session_pstore' -
Error:
test_set_form(TestNetHTTP_v1_2):
LoadError: cannot load such file -- openssl
.../ruby/lib/securerandom.rb:59:inrandom_bytes' .../ruby/lib/securerandom.rb:191:in
urlsafe_base64'
.../ruby/lib/net/http.rb:2018:insend_request_with_body_data' .../ruby/lib/net/http.rb:1973:in
exec'
.../ruby/lib/net/http.rb:1348:inblock in transport_request' .../ruby/lib/net/http.rb:1347:in
catch'
.../ruby/lib/net/http.rb:1347:intransport_request' .../ruby/lib/net/http.rb:1321:in
request'
.../ruby/test/net/http/test_http.rb:383:in_test_set_form_multipart' .../ruby/test/net/http/test_http.rb:364:in
block in test_set_form'
.../ruby/lib/net/http.rb:774:instart' .../ruby/test/net/http/utils.rb:11:in
start'
.../ruby/test/net/http/test_http.rb:362:in `test_set_form' -
Error:
test_set_form_with_file(TestNetHTTP_v1_2):
LoadError: cannot load such file -- openssl
.../ruby/lib/securerandom.rb:59:inrandom_bytes' .../ruby/lib/securerandom.rb:191:in
urlsafe_base64'
.../ruby/lib/net/http.rb:2018:insend_request_with_body_data' .../ruby/lib/net/http.rb:1973:in
exec'
.../ruby/lib/net/http.rb:1348:inblock in transport_request' .../ruby/lib/net/http.rb:1347:in
catch'
.../ruby/lib/net/http.rb:1347:intransport_request' .../ruby/lib/net/http.rb:1321:in
request'
.../ruby/test/net/http/test_http.rb:412:inblock in test_set_form_with_file' .../ruby/lib/net/http.rb:774:in
start'
.../ruby/test/net/http/utils.rb:11:instart' .../ruby/test/net/http/test_http.rb:408:in
test_set_form_with_file' -
Error:
test_set_form(TestNetHTTP_v1_2_chunked):
LoadError: cannot load such file -- openssl
.../ruby/lib/securerandom.rb:59:inrandom_bytes' .../ruby/lib/securerandom.rb:191:in
urlsafe_base64'
.../ruby/lib/net/http.rb:2018:insend_request_with_body_data' .../ruby/lib/net/http.rb:1973:in
exec'
.../ruby/lib/net/http.rb:1348:inblock in transport_request' .../ruby/lib/net/http.rb:1347:in
catch'
.../ruby/lib/net/http.rb:1347:intransport_request' .../ruby/lib/net/http.rb:1321:in
request'
.../ruby/test/net/http/test_http.rb:383:in_test_set_form_multipart' .../ruby/test/net/http/test_http.rb:364:in
block in test_set_form'
.../ruby/lib/net/http.rb:774:instart' .../ruby/test/net/http/utils.rb:11:in
start'
.../ruby/test/net/http/test_http.rb:362:in `test_set_form' -
Error:
test_set_form_with_file(TestNetHTTP_v1_2_chunked):
LoadError: cannot load such file -- openssl
.../ruby/lib/securerandom.rb:59:inrandom_bytes' .../ruby/lib/securerandom.rb:191:in
urlsafe_base64'
.../ruby/lib/net/http.rb:2018:insend_request_with_body_data' .../ruby/lib/net/http.rb:1973:in
exec'
.../ruby/lib/net/http.rb:1348:inblock in transport_request' .../ruby/lib/net/http.rb:1347:in
catch'
.../ruby/lib/net/http.rb:1347:intransport_request' .../ruby/lib/net/http.rb:1321:in
request'
.../ruby/test/net/http/test_http.rb:412:inblock in test_set_form_with_file' .../ruby/lib/net/http.rb:774:in
start'
.../ruby/test/net/http/utils.rb:11:instart' .../ruby/test/net/http/test_http.rb:408:in
test_set_form_with_file' -
Error:
test_no_server(TestResolvDNS):
LoadError: cannot load such file -- openssl
.../ruby/lib/securerandom.rb:59:inrandom_bytes' .../ruby/lib/securerandom.rb:224:in
random_number'
.../ruby/lib/resolv.rb:596:inrandom' .../ruby/lib/resolv.rb:614:in
rangerand'
.../ruby/lib/resolv.rb:646:inbind_random_port' .../ruby/lib/resolv.rb:783:in
initialize'
.../ruby/lib/resolv.rb:552:innew' .../ruby/lib/resolv.rb:552:in
make_udp_requester'
.../ruby/lib/resolv.rb:510:ineach_resource' .../ruby/lib/resolv.rb:500:in
getresources'
.../ruby/test/resolv/test_dns.rb:149:inblock in test_no_server' .../ruby/lib/resolv.rb:302:in
open'
.../ruby/test/resolv/test_dns.rb:148:in `test_no_server' -
Error:
test_query_ipv4_address_timeout(TestResolvDNS):
LoadError: cannot load such file -- openssl
.../ruby/lib/securerandom.rb:59:inrandom_bytes' .../ruby/lib/securerandom.rb:224:in
random_number'
.../ruby/lib/resolv.rb:596:inrandom' .../ruby/lib/resolv.rb:614:in
rangerand'
.../ruby/lib/resolv.rb:646:inbind_random_port' .../ruby/lib/resolv.rb:783:in
initialize'
.../ruby/lib/resolv.rb:552:innew' .../ruby/lib/resolv.rb:552:in
make_udp_requester'
.../ruby/lib/resolv.rb:510:ineach_resource' .../ruby/lib/resolv.rb:500:in
getresources'
.../ruby/test/resolv/test_dns.rb:121:inblock (2 levels) in test_query_ipv4_address_timeout' .../ruby/lib/resolv.rb:302:in
open'
.../ruby/test/resolv/test_dns.rb:118:inblock in test_query_ipv4_address_timeout' .../ruby/test/resolv/test_dns.rb:19:in
with_udp'
.../ruby/test/resolv/test_dns.rb:115:in `test_query_ipv4_address_timeout' -
Error:
test_s_base64(TestSecureRandom):
LoadError: cannot load such file -- openssl
.../ruby/lib/securerandom.rb:59:inrandom_bytes' .../ruby/lib/securerandom.rb:161:in
base64'
.../ruby/test/test_securerandom.rb:109:in `test_s_base64' -
Error:
test_s_hex(TestSecureRandom):
LoadError: cannot load such file -- openssl
.../ruby/lib/securerandom.rb:59:inrandom_bytes' .../ruby/lib/securerandom.rb:140:in
hex'
.../ruby/test/test_securerandom.rb:101:in `test_s_hex' -
Error:
test_s_random_bytes(TestSecureRandom):
LoadError: cannot load such file -- openssl
.../ruby/lib/securerandom.rb:59:inrandom_bytes' .../ruby/test/test_securerandom.rb:12:in
test_s_random_bytes' -
Error:
test_s_random_number_float(TestSecureRandom):
LoadError: cannot load such file -- openssl
.../ruby/lib/securerandom.rb:59:inrandom_bytes' .../ruby/lib/securerandom.rb:230:in
random_number'
.../ruby/test/test_securerandom.rb:129:inblock in test_s_random_number_float' .../ruby/test/test_securerandom.rb:128:in
times'
.../ruby/test/test_securerandom.rb:128:in `test_s_random_number_float' -
Error:
test_s_random_number_float_by_zero(TestSecureRandom):
LoadError: cannot load such file -- openssl
.../ruby/lib/securerandom.rb:59:inrandom_bytes' .../ruby/lib/securerandom.rb:230:in
random_number'
.../ruby/test/test_securerandom.rb:136:inblock in test_s_random_number_float_by_zero' .../ruby/test/test_securerandom.rb:135:in
times'
.../ruby/test/test_securerandom.rb:135:in `test_s_random_number_float_by_zero' -
Error:
test_s_random_number_int(TestSecureRandom):
LoadError: cannot load such file -- openssl
.../ruby/lib/securerandom.rb:59:inrandom_bytes' .../ruby/lib/securerandom.rb:224:in
random_number'
.../ruby/test/test_securerandom.rb:144:inblock in test_s_random_number_int' .../ruby/test/test_securerandom.rb:142:in
times'
.../ruby/test/test_securerandom.rb:142:in `test_s_random_number_int' -
Error:
test_s_urlsafe_base64(TestSecureRandom):
LoadError: cannot load such file -- openssl
.../ruby/lib/securerandom.rb:59:inrandom_bytes' .../ruby/lib/securerandom.rb:191:in
urlsafe_base64'
.../ruby/test/test_securerandom.rb:118:inblock in test_s_urlsafe_base64' .../ruby/test/test_securerandom.rb:117:in
times'
.../ruby/test/test_securerandom.rb:117:in `test_s_urlsafe_base64' -
Error:
test_uuid(TestSecureRandom):
LoadError: cannot load such file -- openssl
.../ruby/lib/securerandom.rb:59:inrandom_bytes' .../ruby/lib/securerandom.rb:247:in
uuid'
.../ruby/test/test_securerandom.rb:150:in `test_uuid' -
Error:
test_connect(TestWEBrickHTTPProxy):
LoadError: cannot load such file -- openssl
.../ruby/test/webrick/test_httpproxy.rb:136:in `test_connect' -
Error:
test_upstream_proxy(TestWEBrickHTTPProxy):
LoadError: cannot load such file -- openssl
.../ruby/test/webrick/test_httpproxy.rb:249:inblock (2 levels) in test_upstream_proxy' .../ruby/test/webrick/utils.rb:41:in
yield'
.../ruby/test/webrick/utils.rb:41:instart_server' .../ruby/test/webrick/utils.rb:56:in
start_httpproxy'
.../ruby/test/webrick/test_httpproxy.rb:200:inblock in test_upstream_proxy' .../ruby/test/webrick/utils.rb:41:in
yield'
.../ruby/test/webrick/utils.rb:41:instart_server' .../ruby/test/webrick/utils.rb:56:in
start_httpproxy'
.../ruby/test/webrick/test_httpproxy.rb:190:in `test_upstream_proxy'
9517 tests, 2239674 assertions, 1 failures, 33 errors, 49 skips
Updated by znz (Kazuhiro NISHIYAMA) about 12 years ago
r34555 で関連する修正が入っていますが、'autoload :OpenSSL, "openssl"; p defined?(OpenSSL) は "constant" のままのようなので、 r34421 で入れた対処は revert せずにそのままにしておきます。
Updated by naruse (Yui NARUSE) about 12 years ago
- Tracker changed from Bug to Backport
- Project changed from Ruby master to Backport193
- Target version deleted (
2.0.0)
Updated by naruse (Yui NARUSE) about 12 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r34607.
Kazuhiro, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
merge revision(s) 34555: [Backport #5786]
* compile.c (defined_expr): guard the whole expression.
[ruby-dev:45021][Bug#5786]