XMPP4R is an XMPP/Jabber library for Ruby. Its goal is to provide a complete framework to develop Jabber-related applications or scripts in Ruby.


Current status

You can basically do everything you want with XMPP4R. It fully supports XMPP, and also a wide range of extensions (XEPs). Also, it's very easy to extend.

A lot of examples are shipped with XMPP4R (If you installed from a linux package see /usr/share/doc/xmpp4r/examples/ or /usr/local/share/doc/xmpp4r/examples/, or take a look in the data/doc dir if you have a copy of the source code).

Download and Installation

The latest stable XMPP4R release is XMPP4R 0.5.

From a tarball

Releases are available here: http://download.gna.org/xmpp4r/. Untar the archive and run ./setup.rb

Using RubyGems

gem install xmpp4r

Using a package for your distribution

There's a package available in Debian and Ubuntu. Just apt-get install libxmpp4r-ruby. With Gentoo, XMPP4R can be installed via emerge dev-ruby/xmpp4r.

Using RubyGems to install from GitHub (development version)

You should be using RubyGems version 1.2.0+ to use this method

gem sources -a http://gems.github.com (you only need to do this once!)
gem install ln-xmpp4r

Using Git to install the development version

git clone git://github.com/ln/xmpp4r.git (see GitHub)

Related Projects

Alternative Jabber libraries for Ruby

Libraries on top of XMPP4R



Discussions take place on the xmpp4r-devel at gna dot org mailing list.

Bugs can be reported to the mailing list or on the GNA project page.

When reporting bugs, please provide as much information as possible:

The main development branch is hosted on Github. We encourage contributors to get familiarized with Git, as Git makes it very easy to get patches into the project, not just for the maintainer but also for the contributor himself. A few typical questions are answered on the GitHub FAQ Page. Feel free to make a GitHub 'fork' of the project and send us pull requests or patches to the xmpp4r-devel mailing list.

The SVN repository isn't updated anymore, but is still accessible at svn co svn://svn.gna.org/svn/xmpp4r/trunk/xmpp4r for historical reasons.

The RDOC source code documentation is browseable here. It might not be completely up-to-date (but we try hard to make it be). If you have the source code you can generate your own using docs using rake rdoc

Articles about developing with XMPP4R

Famundo Dev Blog has a series of introductory articles about XMPP4R:

Another two-part Tutorial can be found at Ruby Fleebie:

A German tutorial is available at the BSD-Crew Wiki: Jabberbots mit XMPP4R