I am using a ejabberd server with an external script for authentication. I was able to connect to it using an IM client, such as pidgin. Then a few months ago I tried to write a chatbot in ruby using the blather gem. I took the examples/echo.rb script to connect to my ejabberd server. When I had the 0.7.1 version of the blather gem, it worked fine, and I got:
But after I upgraded blather to 0.8.0, I got an error. It would print my jid and password (no space between them) before it output the stacktrace:
/home/foo/.rvm/gems/ruby-1.9.3-p194@railschat/gems/blather-0.8.0/lib/blather/client/client.rb:232:in `block in setup_initial_handlers'
/home/foo/.rvm/gems/ruby-1.9.3-p194@railschat/gems/blather-0.8.0/lib/blather/client/client.rb:295:in `call'
/home/foo/.rvm/gems/ruby-1.9.3-p194@railschat/gems/blather-0.8.0/lib/blather/client/client.rb:295:in `call_handler'
/home/foo/.rvm/gems/ruby-1.9.3-p194@railschat/gems/blather-0.8.0/lib/blather/client/client.rb:286:in `block (2 levels) in call_handler_for'
/home/foo/.rvm/gems/ruby-1.9.3-p194@railschat/gems/blather-0.8.0/lib/blather/client/client.rb:286:in `catch'
/home/foo/.rvm/gems/ruby-1.9.3-p194@railschat/gems/blather-0.8.0/lib/blather/client/client.rb:286:in `block in call_handler_for'
/home/foo/.rvm/gems/ruby-1.9.3-p194@railschat/gems/blather-0.8.0/lib/blather/client/client.rb:285:in `each'
/home/foo/.rvm/gems/ruby-1.9.3-p194@railschat/gems/blather-0.8.0/lib/blather/client/client.rb:285:in `find'
/home/foo/.rvm/gems/ruby-1.9.3-p194@railschat/gems/blather-0.8.0/lib/blather/client/client.rb:285:in `call_handler_for'
/home/foo/.rvm/gems/ruby-1.9.3-p194@railschat/gems/blather-0.8.0/lib/blather/client/client.rb:278:in `block in handle_stanza'
/home/foo/.rvm/gems/ruby-1.9.3-p194@railschat/gems/blather-0.8.0/lib/blather/client/client.rb:277:in `each'
/home/foo/.rvm/gems/ruby-1.9.3-p194@railschat/gems/blather-0.8.0/lib/blather/client/client.rb:277:in `handle_stanza'
/home/foo/.rvm/gems/ruby-1.9.3-p194@railschat/gems/blather-0.8.0/lib/blather/client/client.rb:194:in `block in handle_data'
/home/foo/.rvm/gems/ruby-1.9.3-p194@railschat/gems/blather-0.8.0/lib/blather/client/client.rb:192:in `catch'
/home/foo/.rvm/gems/ruby-1.9.3-p194@railschat/gems/blather-0.8.0/lib/blather/client/client.rb:192:in `handle_data'
/home/foo/.rvm/gems/ruby-1.9.3-p194@railschat/gems/blather-0.8.0/lib/blather/client/client.rb:63:in `block in initialize'
/home/foo/.rvm/gems/ruby-1.9.3-p194@railschat/gems/girl_friday-0.10.0/lib/girl_friday/work_queue.rb:147:in `call'
/home/foo/.rvm/gems/ruby-1.9.3-p194@railschat/gems/girl_friday-0.10.0/lib/girl_friday/work_queue.rb:147:in `block (2 levels) in start'
/home/foo/.rvm/gems/ruby-1.9.3-p194@railschat/gems/girl_friday-0.10.0/lib/girl_friday/actor.rb:86:in `call'
/home/foo/.rvm/gems/ruby-1.9.3-p194@railschat/gems/girl_friday-0.10.0/lib/girl_friday/actor.rb:86:in `block in spawn_link'
/home/foo/.rvm/gems/ruby-1.9.3-p194@railschat/gems/girl_friday-0.10.0/lib/girl_friday/actor.rb:69:in `call'
/home/foo/.rvm/gems/ruby-1.9.3-p194@railschat/gems/girl_friday-0.10.0/lib/girl_friday/actor.rb:69:in `block (2 levels) in spawn'
/home/foo/.rvm/gems/ruby-1.9.3-p194@railschat/gems/girl_friday-0.10.0/lib/girl_friday/actor.rb:212:in `block in initialize'
/home/foo/.rvm/gems/ruby-1.9.3-p194@railschat/gems/girl_friday-0.10.0/lib/girl_friday/actor.rb:377:in `watchdog'
/home/foo/.rvm/gems/ruby-1.9.3-p194@railschat/gems/girl_friday-0.10.0/lib/girl_friday/actor.rb:212:in `initialize'
/home/foo/.rvm/gems/ruby-1.9.3-p194@railschat/gems/girl_friday-0.10.0/lib/girl_friday/actor.rb:66:in `new'
/home/foo/.rvm/gems/ruby-1.9.3-p194@railschat/gems/girl_friday-0.10.0/lib/girl_friday/actor.rb:66:in `block in spawn'