# Shoes, Gems, Oh, My!

**URL:** <https://www.ruby-forum.com/t/shoes-gems-oh-my/164195>\
**Category:** Ruby\
**Created:** [March 29, 2009, 8:53pm UTC](https://www.ruby-forum.com/t/shoes-gems-oh-my/164195 "2009-03-29T20:53:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cwd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/da6949/32.png) [@cwd](https://www.ruby-forum.com/u/cwd)\
**Post date:** [March 29, 2009, 8:53pm UTC](https://www.ruby-forum.com/t/shoes-gems-oh-my/164195/1 "2009-03-29T20:53:09Z")

</div>

I’ll ask this question that I asked on stackoverflow (to a resounding  
silence). I’m sure someone here knows the answer. I’m not completely  
grokking how Shoes handles gems and, more importantly, what the  
lifetime of objects should be in Shoes. Here was the question:

> <https://stackoverflow.com/questions/691968/shoes-and-gems>

In a nutshell, I do this in my Shoes.setup (extracting to inline code  
for the purposes of simplicity)

Shoes.setup do  
require ‘xmlrpc/client’

secure = true  
@server = XMLRPC::Client.new((secure) ? MWS\_SECURE\_URN : MWS\_URN,  
MWS\_ENDPOINT, nil, nil, nil, nil, nil, secure)  
result = @server.call(‘mywebservice.auth.login’, :userName =\>  
‘me’, :userPassword =\> ‘password’)  
end

The results on the Shoes console are:

undefined method `closed?’ for #OpenSSL::SSL::SSLSocket:somehexnumber

That leads me to believe that I don’t understand how long @server  
hangs around, or something like that. Google has been little help in  
terms of how the gem system works or information about object scope,  
visibility and lifetime.

Any help is appreciated.

Thanks

---

<div class="post-metadata">

**Author:** ![cwd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/da6949/32.png) [@cwd](https://www.ruby-forum.com/u/cwd)\
**Post date:** [March 29, 2009, 9:10pm UTC](https://www.ruby-forum.com/t/shoes-gems-oh-my/164195/2 "2009-03-29T21:10:46Z")

</div>

s.ross wrote:

> I’ll ask this question that I asked on stackoverflow (to a resounding  
> silence).

Ask on the Shoes Adventurers Mailing List. I am quite certain that what  
will  
resound won’t be silence!

> I’m sure someone here knows the answer.

They better keep it to themselves.

The reason you should pick the best forum for a question is so you will  
get the  
best answer. If someone on this group told you the wrong answer, we  
don’t have  
enough critical mass of Shoes afficionados to correct them.

---

<div class="post-metadata">

**Author:** ![cwd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/da6949/32.png) [@cwd](https://www.ruby-forum.com/u/cwd)\
**Post date:** [March 29, 2009, 10:11pm UTC](https://www.ruby-forum.com/t/shoes-gems-oh-my/164195/3 "2009-03-29T22:11:50Z")

</div>

On Mar 29, 2009, at 12:09 PM, Phlip wrote:

> Ask on the Shoes Adventurers Mailing List.

Thanks for the pointer. I’ll consider myself chased off.

I appreciate your frequent contributions to this list, but an answer  
that consists of “I don’t know, ask ‘{here}’” or “use Google” has the  
effect of foreclosing further discussion when someone else might have  
just solved the exact same problem and been able to answer the  
question very quickly. I am aware of the s/n issues and the read-first-  
ask-questions-last research method.

Again, your contributions are significant and for that, thanks.

---

<div class="post-metadata">

**Author:** ![cwd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/da6949/32.png) [@cwd](https://www.ruby-forum.com/u/cwd)\
**Post date:** [April 2, 2009, 6:59pm UTC](https://www.ruby-forum.com/t/shoes-gems-oh-my/164195/4 "2009-04-02T18:59:31Z")

</div>

On Sunday 29 March 2009 13:10:23 s.ross wrote:

> ask-questions-last research method.
> 
> Again, your contributions are significant and for that, thanks.

Anyway, this looks more like a stdlib question than a shoes question.  
What  
line generates that exception? Can you show the exception backtrace plus  
the  
offending code that generates the exception.
