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

jid = Jabber::JID.new('[email protected]')
@client = Jabber::Client.new(jid)

The error:
`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!