Forum Discussion

mr_skater99_640's avatar
mr_skater99_640
Icon for Nimbostratus rankNimbostratus
Aug 09, 2011

Ruby Issues

Hi Guys,

 

 

I've used this page as a guide of sorts (http://devcentral.f5.com/Tutorials/TechTips/tabid/63/articleType/ArticleView/articleId/1086421/Getting-Started-With-Ruby-and-iControl.aspx)

 

 

I've got ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux] and gem version 1.8.7 on Debian 6 64bit.

 

 

I've installed both the httpclient and soap4r gems.

 

 

The first issue i ran into running get-version.rb was:

 

 

/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/xsd/charset.rb:13: warning: variable $KCODE is no longer effective

 

/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/xsd/xmlparser.rb:74:in `': XML processor module not found. (RuntimeError)

 

from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'

 

from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'

 

from /usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/wsdl/parser.rb:12:in `'

 

from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'

 

from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'

 

from /usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/wsdlDriver.rb:9:in `'

 

from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:59:in `require'

 

from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require'

 

from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'

 

from /usr/lib/ruby/gems/1.9.1/gems/f5-icontrol-10.2.0.2/lib/f5-icontrol.rb:2:in `'

 

from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:59:in `require'

 

from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require'

 

from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'

 

from get-version.rb:4:in `'

 

 

Which was fixed by editing /usr/local/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/xsd/xmlparser.rb as suggested on this page (

 

http://railsforum.com/viewtopic.php?id=41231).

 

 

Now i am getting this:

 

 

/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/xsd/charset.rb:13: warning: variable $KCODE is no longer effective

 

/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/property.rb:68: warning: encoding option is ignored - u

 

/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/property.rb:69: warning: encoding option is ignored - u

 

/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/property.rb:70: warning: encoding option is ignored - u

 

/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hashindex is deprecated; use Hashkey

 

/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hashindex is deprecated; use Hashkey

 

/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hashindex is deprecated; use Hashkey

 

/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hashindex is deprecated; use Hashkey

 

/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hashindex is deprecated; use Hashkey

 

/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hashindex is deprecated; use Hashkey

 

/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hashindex is deprecated; use Hashkey

 

/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hashindex is deprecated; use Hashkey

 

/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hashindex is deprecated; use Hashkey

 

/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hashindex is deprecated; use Hashkey

 

/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hashindex is deprecated; use Hashkey

 

/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hashindex is deprecated; use Hashkey

 

/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hashindex is deprecated; use Hashkey

 

/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hashindex is deprecated; use Hashkey

 

/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hashindex is deprecated; use Hashkey

 

/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/generator.rb:276: warning: encoding option is ignored - UTF8

 

 

 

Long pause then:

 

 

/usr/lib/ruby/gems/1.9.1/gems/httpclient-2.2.1/lib/httpclient/session.rb:276:in `connect': execution expired (HTTPClient::ConnectTimeoutError)

 

from /usr/lib/ruby/gems/1.9.1/gems/httpclient-2.2.1/lib/httpclient/session.rb:276:in `ssl_connect'

 

from /usr/lib/ruby/gems/1.9.1/gems/httpclient-2.2.1/lib/httpclient/session.rb:712:in `block in connect'

 

from /usr/lib/ruby/gems/1.9.1/gems/httpclient-2.2.1/lib/httpclient/session.rb:704:in `connect'

 

from /usr/lib/ruby/gems/1.9.1/gems/httpclient-2.2.1/lib/httpclient/session.rb:568:in `query'

 

from /usr/lib/ruby/gems/1.9.1/gems/httpclient-2.2.1/lib/httpclient/session.rb:158:in `query'

 

from /usr/lib/ruby/gems/1.9.1/gems/httpclient-2.2.1/lib/httpclient.rb:1057:in `do_get_block'

 

from /usr/lib/ruby/gems/1.9.1/gems/httpclient-2.2.1/lib/httpclient.rb:866:in `block in do_request'

 

from /usr/lib/ruby/gems/1.9.1/gems/httpclient-2.2.1/lib/httpclient.rb:953:in `protect_keep_alive_disconnected'

 

from /usr/lib/ruby/gems/1.9.1/gems/httpclient-2.2.1/lib/httpclient.rb:865:in `do_request'

 

from /usr/lib/ruby/gems/1.9.1/gems/httpclient-2.2.1/lib/httpclient.rb:753:in `request'

 

from /usr/lib/ruby/gems/1.9.1/gems/httpclient-2.2.1/lib/httpclient.rb:663:in `post'

 

from /usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/streamHandler.rb:238:in `send_post'

 

from /usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/streamHandler.rb:172:in `send'

 

from /usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/rpc/proxy.rb:179:in `route'

 

from /usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/rpc/proxy.rb:143:in `call'

 

from /usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/rpc/driver.rb:181:in `call'

 

from (eval):6:in `get_version'

 

from get-version.rb:15:in `'

 

 

 

I've checked an i have access to the host (telnet ip on 443). Do the default self signed certs cause this???

 

 

Anyone else got any other ideas???

 

 

Thanks.

 

 

 

  • My bad - had a proxy set in the terminal i was working in.

     

     

    Unsetting $http_proxy fixed it!
  • Hi,

     

    I am facing the same issue and came across this post. I can't telnet to 192.168.1.245 on 443. Is this still valid for you?

     

     

    Appreciate your response.

     

    Thanks.
  • Hi Utulavi,

     

     

    My issues was solved by fixing the proxy environment variable ont eh linux host i was working on.

     

     

    Cheers,

     

     

    Scotty