Undefined method `close' for OpenSSL::SSL::SSLSocket

I'm having a problem with 1.8.6 and soap4r that I don't understand. I'm
running within Apache as a CGI. I developed this code on a Windows box
and it works fine, but I've moved the code to my production Linux
environment and I get this error:

undefined method `close' for #<OpenSSL::SSL::SSLSocket:0xb790c024>

Fault Class: NoMethodError

/data1/target_copy/gems/httpclient-2.1.4/lib/httpclient/session.rb:271:in
`close'
/data1/target_copy/gems/httpclient-2.1.4/lib/httpclient/session.rb:554:in
`close'
/data1/target_copy/gems/httpclient-2.1.4/lib/httpclient/session.rb:149:in
`query'
/data1/target_copy/gems/httpclient-2.1.4/lib/httpclient.rb:942:in
`do_get_block'
/data1/target_copy/gems/httpclient-2.1.4/lib/httpclient.rb:758:in
`do_request'
/data1/target_copy/gems/httpclient-2.1.4/lib/httpclient.rb:837:in
`protect_keep_alive_disconnected'
/data1/target_copy/gems/httpclient-2.1.4/lib/httpclient.rb:757:in
`do_request'
/data1/target_copy/gems/httpclient-2.1.4/lib/httpclient.rb:663:in
`request'
/data1/target_copy/gems/httpclient-2.1.4/lib/httpclient.rb:591:in `post'
/data1/target_copy/lib/soap/streamHandler.rb:238:in `send_post'
/data1/target_copy/lib/soap/streamHandler.rb:172:in `send'
/data1/target_copy/lib/soap/rpc/proxy.rb:179:in `route'
/data1/target_copy/lib/soap/rpc/proxy.rb:143:in `call'
/data1/target_copy/lib/soap/rpc/driver.rb:181:in `call'
(eval):6:in `list'
/data1/target_copy/lib/sm-utils.rb:338:in `list_targets'
/data1/target_copy/lib/sm-soap-utils.rb:111:in `list_targets'
/data1/target_copy/lib/tc-utils.rb:465:in `get_global_targets_hash'
/data1/target_copy/lib/tc-actions.rb:97:in `main'
/data1/target_copy/www/target_copy.cgi:121

Any suggestions about how I might resolve this problem would be greatly
appreciated.

Thanks,

Brad

···

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

I've determined that "include Buffering" is somehow being ignored for
class SSLSocket in file openssl/ssl.rb. Can anyone suggest a reason why
that could be happening?

(My working Windows version is patchlevel 111 but my non-working Linux
version is patchlevel 111. Could this account for anything? I can't find
release notes that describe the changes between the patchlevels.)

Brad Whitaker wrote:

···

I'm having a problem with 1.8.6 and soap4r that I don't understand. I'm
running within Apache as a CGI. I developed this code on a Windows box
and it works fine, but I've moved the code to my production Linux
environment and I get this error:

undefined method `close' for #<OpenSSL::SSL::SSLSocket:0xb790c024>

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

I resolved my problem. My load paths were 'reversed', i.e. the machine
specific path "/ruby/lib/ruby/1.8/i686-linux" was located before the
non-machine specific path "/ruby/lib/ruby/1.8". The httpclient gem has a
statement "require openssl" that is intended to open file "openssl.rb"
but was opening "openssl.so" instead because of the unusual order of my
load paths. The end result was that various modules (mixins) that are
'included' in OpenSSL::SSL::SSLSocket (e.g. Buffering) were not being
loaded and were not augmenting the SSLSocket class.

Brad Whitaker wrote:

···

I've determined that "include Buffering" is somehow being ignored for
class SSLSocket in file openssl/ssl.rb. Can anyone suggest a reason why
that could be happening?

(My working Windows version is patchlevel 111 but my non-working Linux
version is patchlevel 111. Could this account for anything? I can't find
release notes that describe the changes between the patchlevels.)

Brad Whitaker wrote:

I'm having a problem with 1.8.6 and soap4r that I don't understand. I'm
running within Apache as a CGI. I developed this code on a Windows box
and it works fine, but I've moved the code to my production Linux
environment and I get this error:

undefined method `close' for #<OpenSSL::SSL::SSLSocket:0xb790c024>

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