{"action":"closed","issue":{"number":2,"created_at":"2011-07-14T21:06:59Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"Hello!  I am getting the following error (truncated) when trying to use the capistrano_winrm gem:\r\n\r\nwinrmtest$ cap winrm_plain\r\n  * executing `winrm_plain'\r\n  * executing \"netstat -an\"\r\n    servers: [\"10.80.1.125\"]\r\n  * establishing connection to WinRM\r\n    [10.80.1.125:5985] executing command\r\n/usr/local/rvm/gems/ruby-1.9.2-p180/gems/httpclient-2.2.0.2/lib/httpclient/auth.rb:564:in `get': undefined method `init_context' for nil:NilClass (NoMethodError\r\n\r\nmy deploy.rb looks like:\r\n\r\n\r\nrequire 'capistrano_winrm'\r\n\r\nrole :win_standalone, '10.80.1.125:5985'\r\n\r\ndef winrm_netstat\r\n  host_data = {}\r\n  cmd = 'netstat -an'\r\n  winrm cmd do |channel, stream, data|\r\n    host_data[channel[:host]] = \"\" unless host_data[channel[:host]].is_a?(String)\r\n    host_data[channel[:host]] << data\r\n  end\r\n\r\n  host_data.each_pair do |host,data|\r\n    puts \"HOST: #{host}\"\r\n    puts \"---------------------------------------\"\r\n    puts data\r\n    puts \"---------------------------------------\"\r\n  end\r\nend\r\n\r\ntask :winrm_krb5, :roles => :win_domain do\r\n  set :winrm_krb5_realm, 'EXAMPLE.COM'\r\n  winrm_netstat\r\n  unset :winrm_krb5_realm\r\nend\r\n\r\ntask :winrm_plain, :roles => :win_standalone do\r\n  set :winrm_user, 'Administrator'\r\n  set :winrm_password, 'Password'\r\n  #set :winrm_ssl_ca_store, '/etc/ssl/certs'\r\n  winrm_netstat\r\n  #unset :winrm_ssl_ca_store\r\n  unset :winrm_user\r\n  unset :winrm_password\r\nend\r\n\r\ntask :allwinrm do\r\n  winrm_krb5\r\n  winrm_plain\r\nend\r\n\r\n\r\nwhich is really just slightly modified from the example provided.  I have also installed winrm gem, and I am able to connect that server with out issue:\r\n\r\n\r\nrequire 'winrm'\r\nendpoint = 'http://10.80.1.125:5985/wsman'\r\n\r\nwinrm = WinRM::WinRMWebService.new(endpoint, :plaintext, :user => 'administrator', :pass => 'Password', :basic_auth_only => true)\r\nwinrm.cmd('ipconfig /all') do |stdout, stderr|\r\n  STDOUT.print stdout\r\n  STDERR.print stderr\r\nend\r\n\r\nBut no matter what it just seems to flip out when i try the cap winrm_plain task.  Is there just something stupid I am missing?\r\n\r\nFull stack trace:\r\n\r\nwinrmtest$ cap winrm_plain\r\n  * executing `winrm_plain'\r\n  * executing \"netstat -an\"\r\n    servers: [\"10.80.1.125\"]\r\n  * establishing connection to WinRM\r\n    [10.80.1.125:5985] executing command\r\n/usr/local/rvm/gems/ruby-1.9.2-p180/gems/httpclient-2.2.0.2/lib/httpclient/auth.rb:564:in `get': undefined method `init_context' for nil:NilClass (NoMethodError)\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/httpclient-2.2.0.2/lib/httpclient/auth.rb:114:in `block in filter_request'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/httpclient-2.2.0.2/lib/httpclient/auth.rb:112:in `each'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/httpclient-2.2.0.2/lib/httpclient/auth.rb:112:in `filter_request'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/httpclient-2.2.0.2/lib/httpclient.rb:1047:in `block in do_get_block'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/httpclient-2.2.0.2/lib/httpclient.rb:1046:in `each'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/httpclient-2.2.0.2/lib/httpclient.rb:1046:in `do_get_block'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/httpclient-2.2.0.2/lib/httpclient.rb:866:in `block in do_request'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/httpclient-2.2.0.2/lib/httpclient.rb:953:in `protect_keep_alive_disconnected'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/httpclient-2.2.0.2/lib/httpclient.rb:865:in `do_request'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/httpclient-2.2.0.2/lib/httpclient.rb:753:in `request'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/httpclient-2.2.0.2/lib/httpclient.rb:663:in `post'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/winrm-1.0.2/lib/winrm/http/transport.rb:19:in `send_request'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/winrm-1.0.2/lib/winrm/winrm_service.rb:333:in `send_message'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/winrm-1.0.2/lib/winrm/winrm_service.rb:118:in `run_command'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/winrm-1.0.2/lib/winrm/winrm_service.rb:222:in `run_cmd'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/capistrano_winrm-1.0.0/lib/winrm_connection.rb:27:in `exec'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/capistrano-2.6.0/lib/capistrano/command.rb:222:in `block (4 levels) in open_channels'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/capistrano-2.6.0/lib/capistrano/command.rb:259:in `request_pty_if_necessary'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/capistrano-2.6.0/lib/capistrano/command.rb:206:in `block (3 levels) in open_channels'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/capistrano_winrm-1.0.0/lib/winrm_connection.rb:23:in `open_channel'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/capistrano-2.6.0/lib/capistrano/command.rb:200:in `block (2 levels) in open_channels'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/capistrano-2.6.0/lib/capistrano/command.rb:199:in `map'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/capistrano-2.6.0/lib/capistrano/command.rb:199:in `block in open_channels'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/capistrano-2.6.0/lib/capistrano/command.rb:197:in `map'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/capistrano-2.6.0/lib/capistrano/command.rb:197:in `open_channels'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/capistrano-2.6.0/lib/capistrano/command.rb:156:in `initialize'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/capistrano-2.6.0/lib/capistrano/command.rb:134:in `new'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/capistrano-2.6.0/lib/capistrano/command.rb:134:in `process'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/capistrano-2.6.0/lib/capistrano/configuration/actions/invocation.rb:175:in `block in run_tree'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/capistrano-2.6.0/lib/capistrano/configuration/connections.rb:192:in `block in execute_on_servers'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/capistrano-2.6.0/lib/capistrano/configuration/connections.rb:180:in `each'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/capistrano-2.6.0/lib/capistrano/configuration/connections.rb:180:in `each_slice'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/capistrano-2.6.0/lib/capistrano/configuration/connections.rb:180:in `execute_on_servers'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/capistrano-2.6.0/lib/capistrano/configuration/actions/invocation.rb:173:in `run_tree'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/capistrano_winrm-1.0.0/lib/capistrano_winrm.rb:11:in `winrm_run'\r\n\tfrom ./config/deploy.rb:10:in `winrm_netstat'\r\n\tfrom ./config/deploy.rb:34:in `block in load'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/capistrano-2.6.0/lib/capistrano/configuration/execution.rb:139:in `instance_eval'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/capistrano-2.6.0/lib/capistrano/configuration/execution.rb:139:in `invoke_task_directly'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/capistrano-2.6.0/lib/capistrano/configuration/callbacks.rb:27:in `invoke_task_directly_with_callbacks'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/capistrano-2.6.0/lib/capistrano/configuration/execution.rb:89:in `execute_task'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/capistrano-2.6.0/lib/capistrano/configuration/execution.rb:101:in `find_and_execute_task'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/capistrano-2.6.0/lib/capistrano/cli/execute.rb:46:in `block in execute_requested_actions'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/capistrano-2.6.0/lib/capistrano/cli/execute.rb:45:in `each'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/capistrano-2.6.0/lib/capistrano/cli/execute.rb:45:in `execute_requested_actions'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/capistrano-2.6.0/lib/capistrano/cli/help.rb:19:in `execute_requested_actions_with_help'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/capistrano-2.6.0/lib/capistrano/cli/execute.rb:34:in `execute!'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/capistrano-2.6.0/lib/capistrano/cli/execute.rb:14:in `execute'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/gems/capistrano-2.6.0/bin/cap:4:in `<top (required)>'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/bin/cap:19:in `load'\r\n\tfrom /usr/local/rvm/gems/ruby-1.9.2-p180/bin/cap:19:in `<main>'\r\n","comments":5,"title":"undefined method in 'init_context' ","updated_at":"2011-10-09T03:39:45Z","url":"https://api.github.com/repos/zenchild/capistrano_winrm/issues/2","id":1225916,"assignee":null,"milestone":null,"closed_at":"2011-10-09T03:39:45Z","user":{"avatar_url":"https://secure.gravatar.com/avatar/37e84f8507a3147cac6ffb26a06a0ee2?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/zadunn","id":916075,"login":"zadunn"},"html_url":"https://github.com/zenchild/capistrano_winrm/issues/2","labels":[],"state":"closed"},"legacy":{"number":2,"action":"closed","issue":1225916}}