Follow the instructions found here to get started.

www.rabbitmq.com/management-cli.html

Once rabbitmqadmin is on the path you can use this gem in rake, capistrano or regular ruby.

v1.0.3 Added parameters to connect to any host/port v1.0.4 Added class based test_connection(host, port) method and use it in initialize to raise if no connection v1.0.5 Added set_permissions method, non destructive, will create vhost and/or user if necessary and set permissions