Using with Rails 3.x
Two popular AMQP client libraries for Ruby are the
amqp gems. The
amqp gem uses the asynchronous
EventMachine framework, and so is not a good fit for a Rails application. Thus, use the
bunny gem. Add it to your
gem 'rails', '3.0.10'
bundle install to update
Fetching source index for https://rubygems.org/
Using rake (0.9.2)
Using rails (3.0.10)
Your bundle is complete! Use `bundle show [gemname]` to see where
a bundled gem is installed.
For a full example of using Bigwig and the Bunny gem with Rails, please check out our example rails application. Once that’s checked out, you’ll be able to deploy that to heroku by running the following shell commands:
$ cd rabbitmq-service-rails-sample
$ heroku apps:create
$ heroku addons:create rabbitmq-bigwig
$ git push heroku master
$ heroku apps:open
heroku apps:open should open the sample application in your web-browser. If it can’t figure out how to open a browser on your platform, then visiting the URL previously output by
heroku apps:create with any browser will work fine.