I cannot find where to download the confluence4r gem and it doesn't work when I do:
gem install confluence4r
I downloaded one here: http://confluence.atlassian.com/display/DISC/Confluence4r
I can login
server = Confluence::RPC.new("http://wiki/")
server.login("username","password")
but once I do anything else it fails
server.getSpace("key")
but wait.. I do it a 2nd time and it works...
server.getSpace("key")
{"name"=>"key example", "homePage"=>"235325", "url"=>"http://wiki/display/key", "type"=>"global", "description"=>"description example", "key"=>"key"}
Here's the error I receive on the first try before making it work on the 2nd try:
EOFError: end of file reached
from /usr/lib/ruby/1.8/net/protocol.rb:135:in sysread'
from /usr/lib/ruby/1.8/net/protocol.rb:135:in
rbuf_fill'
from /usr/lib/ruby/1.8/timeout.rb:62:in timeout'
from /usr/lib/ruby/1.8/timeout.rb:93:in
timeout'
from /usr/lib/ruby/1.8/net/protocol.rb:134:in rbuf_fill'
from /usr/lib/ruby/1.8/net/protocol.rb:116:in
readuntil'
from /usr/lib/ruby/1.8/net/protocol.rb:126:in readline'
from /usr/lib/ruby/1.8/net/http.rb:2024:in
read_status_line'
from /usr/lib/ruby/1.8/net/http.rb:2013:in read_new'
from /usr/lib/ruby/1.8/net/http.rb:1050:in
request'
from /usr/lib/ruby/1.8/net/http.rb:992:in post2'
from /usr/lib/ruby/1.8/xmlrpc/client.rb:538:in
do_rpc'
from /usr/lib/ruby/1.8/xmlrpc/client.rb:420:in call2'
from /usr/lib/ruby/1.8/xmlrpc/client.rb:410:in
call'
from /usr/lib/ruby/1.8/xmlrpc/client.rb:617:in send'
from /usr/lib/ruby/1.8/xmlrpc/client.rb:617:in
method_missing'
from ./confluence4r.rb:35:in send'
from ./confluence4r.rb:35:in
method_missing'
Any ideas why I'm getting the error?
EDIT
Okay, I'm using part of this gem instead and it works fine:
gem install confluencer
@api = Confluence::Client.new(:url => "http://wiki")
@api.login("username","password")
user = @api.getUser("username")
pp user
{"name"=>"username",
"url"=>"http://wiki/display/~username",
"fullname"=>"Full Name",
"email"=>"[email protected]"}
now the problem is I am unable to add anything, but I can do gets and thats it. It just hangs and I believe continues to do a retry over and over again. Maybe my wiki is broken..
create_user = @api.createUser("username","password","First LastName","[email protected]")
pp create_user
Hangs at create_user