jpatokal/mediawiki-gateway — Issue #26: login doesn't work
Author: bosborne
Created: 2012-01-06 03:54:24+00:00
State: open

This is odd.

>ruby -v
ruby 1.9.3p0 (2011-10-30) [x86_64-darwin11.2.0]

In the debugger:

wiki-to-rails.rb:4:require 'media_wiki'
(rdb:1) n
wiki-to-rails.rb:5:require 'mysql'
(rdb:1)
n
wiki-to-rails.rb:7:mw = MediaWiki::Gateway.new('http://127.0.0.1/mediawiki/api.php')
(rdb:1)
n
wiki-to-rails.rb:8:mw.login('bosborne','n7olof')
(rdb:1)
n
/usr/local/lib/ruby/1.9.1/net/protocol.rb:141: `' (NilClass)
from /usr/local/lib/ruby/1.9.1/net/http.rb:2562:in `read_status_line'
from /usr/local/lib/ruby/1.9.1/net/http.rb:2551:in `read_new'
from /usr/local/lib/ruby/1.9.1/net/http.rb:1319:in `block in transport_request'
from /usr/local/lib/ruby/1.9.1/net/http.rb:1316:in `catch'
from /usr/local/lib/ruby/1.9.1/net/http.rb:1316:in `transport_request'
from /usr/local/lib/ruby/1.9.1/net/http.rb:1293:in `request'
from /usr/local/lib/ruby/gems/1.9.1/gems/rest-client-1.6.7/lib/restclient/net_http_ext.rb:51:in `request'
from /usr/local/lib/ruby/gems/1.9.1/gems/rest-client-1.6.7/lib/restclient/request.rb:176:in `block in transmit'
from /usr/local/lib/ruby/1.9.1/net/http.rb:745:in `start'
from /usr/local/lib/ruby/gems/1.9.1/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in `transmit'
from /usr/local/lib/ruby/gems/1.9.1/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
from /usr/local/lib/ruby/gems/1.9.1/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'
from /usr/local/lib/ruby/gems/1.9.1/gems/rest-client-1.6.7/lib/restclient.rb:72:in `post'
from /usr/local/lib/ruby/gems/1.9.1/gems/mediawiki-gateway-0.4.3/lib/media_wiki/gateway.rb:573:in `make_api_request'
from /usr/local/lib/ruby/gems/1.9.1/gems/mediawiki-gateway-0.4.3/lib/media_wiki/gateway.rb:52:in `login'
from wiki-to-rails.rb:8:in `

'
/usr/local/lib/ruby/1.9.1/net/protocol.rb:141: @rbuf << @io.read_nonblock(BUFSIZE)

Neither 'localhost' nor '127.0.0.1' works. Also the URL is correct. The user and pass are correct, just checked them. Your thoughts?