WebFaction
Community site: login faq

This code used to work:

require 'xmlrpc/client'
server = XMLRPC::Client.new2('https://api.webfaction.com/')
session_id, account = server.call('login', 'tscoho', 'xxx')
server.call("create_email", session_id, "foo@touchstonecohousing.org", '', '', '', '', '', 'Web471', "/home/tscoho/foo")

No I am getting an EOF error.

EOFError: end of file reached
    from /usr/local/lib/ruby19/ruby/1.9.1/openssl/buffering.rb:174:in `sysread_nonblock'
    from /usr/local/lib/ruby19/ruby/1.9.1/openssl/buffering.rb:174:in `read_nonblock'
    from /usr/local/lib/ruby19/ruby/1.9.1/net/protocol.rb:141:in `rbuf_fill'
    from /usr/local/lib/ruby19/ruby/1.9.1/net/protocol.rb:122:in `readuntil'
    from /usr/local/lib/ruby19/ruby/1.9.1/net/protocol.rb:132:in `readline'
    from /usr/local/lib/ruby19/ruby/1.9.1/net/http.rb:2563:in `read_status_line'
    from /usr/local/lib/ruby19/ruby/1.9.1/net/http.rb:2552:in `read_new'
    from /usr/local/lib/ruby19/ruby/1.9.1/net/http.rb:1320:in `block in transport_request'
    from /usr/local/lib/ruby19/ruby/1.9.1/net/http.rb:1317:in `catch'
    from /usr/local/lib/ruby19/ruby/1.9.1/net/http.rb:1317:in `transport_request'
    from /usr/local/lib/ruby19/ruby/1.9.1/net/http.rb:1294:in `request'
    from /usr/local/lib/ruby19/ruby/1.9.1/net/http.rb:1240:in `request_post'
    from /usr/local/lib/ruby19/ruby/1.9.1/xmlrpc/client.rb:538:in `do_rpc'
    from /usr/local/lib/ruby19/ruby/1.9.1/xmlrpc/client.rb:420:in `call2'
    from /usr/local/lib/ruby19/ruby/1.9.1/xmlrpc/client.rb:410:in `call'
    from (irb):4
    from /usr/local/bin/irb1.9:12:in `<main>'irb(main):005

Thoughts?

asked 28 Aug '15, 14:16

hooverlunch
134
accept rate: 0%


Your code seems to be working with the interpreter launched with irb2.0 . Try with that one instead of irb1.9, which guessing from the traceback is the one you are using.

Maybe you were using that one, irb2.0, previously?

permanent link

answered 29 Aug '15, 14:54

iliasr ♦♦
2.1k14
accept rate: 35%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×81
×75

question asked: 28 Aug '15, 14:16

question was seen: 1,528 times

last updated: 29 Aug '15, 14:54

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM