XMPP4R and Openfire

My app sends IM with XMPP4R with Jabber accounts perfectly with this code, but when I want to use an Openfire problem I get an error of authorization

    jid = Jabber::JID.new('myuser@example.com')
    @client = Jabber::Client.new(jid)

The error:
/Library/Ruby/Gems/1.8/gems/xmpp4r-0.4/lib/xmpp4r/client.rb:116:in `auth': not-authorized (Jabber::ClientAuthenticationFailure)

I didn't find any solution searching in Google, yet.
Where can I find a tutorial, howto???
You know what is the problem?

Thanks in advance!