Install rabbitmq first: http://www.rabbitmq.com/download.html
Or brew install rabbitmq
on Mac
Start it up with rabbitmq-server
Install gems to talk to the message queue:
gem install bunny
gem install amqp
Start the daemon, which doesn't actually daemonize itself....
ruby daemon.rb
Run the test:
ruby test.rb