<commit_before># Ruby code for RabbitMQ tutorials

Here you can find Ruby code examples from
[RabbitMQ tutorials](http://www.rabbitmq.com/getstarted.html).

## Requirements

To run this code you need [amqp gem](https://github.com/ruby-amqp/amqp) version 0.8
(currently available as a prerelease version). This code won't work
with earlier versions! You can install it via RubyGems thusly:

    gem install amqp --pre --version "~> 0.8.0.rc12"

## Code

[Tutorial one: "Hello World!"](http://www.rabbitmq.com/tutorial-one-python.html):

    ruby send.rb
    ruby receive.rb

[Tutorial two: Work Queues](http://www.rabbitmq.com/tutorial-two-python.html):

    ruby new_task.rb
    ruby worker.rb

[Tutorial three: Publish/Subscribe](http://www.rabbitmq.com/tutorial-three-python.html)

    ruby receive_logs.rb
    ruby emit_log.rb

[Tutorial four: Routing](http://www.rabbitmq.com/tutorial-four-python.html)

    ruby receive_logs_direct.rb
    ruby emit_log_direct.rb

[Tutorial five: Topics](http://www.rabbitmq.com/tutorial-five-python.html)
<commit_msg>Recommend Windows users to go with JRuby<commit_after># Ruby code for RabbitMQ tutorials

Here you can find Ruby code examples from
[RabbitMQ tutorials](http://www.rabbitmq.com/getstarted.html).

## Requirements

If you use Microsoft Windows, we highly recommend you to use [JRuby](http://jruby.org).
It is 1.9.2-compatible since 1.6.0.

To run this code you need [amqp gem](https://github.com/ruby-amqp/amqp) version 0.8
(currently available as a prerelease version). This code won't work
with earlier versions!

You can install it via RubyGems. On Linux, Mac OS X and *BSD systems:

    gem install amqp --pre --version "~> 0.8.0.rc12"

On Windows:

    jruby.exe --1.9 -S gem install amqp --pre --version "~> 0.8.0.rc12"

## Code

[Tutorial one: "Hello World!"](http://www.rabbitmq.com/tutorial-one-python.html):

    ruby send.rb
    ruby receive.rb

[Tutorial two: Work Queues](http://www.rabbitmq.com/tutorial-two-python.html):

    ruby new_task.rb
    ruby worker.rb

[Tutorial three: Publish/Subscribe](http://www.rabbitmq.com/tutorial-three-python.html)

    ruby receive_logs.rb
    ruby emit_log.rb

[Tutorial four: Routing](http://www.rabbitmq.com/tutorial-four-python.html)

    ruby receive_logs_direct.rb
    ruby emit_log_direct.rb

[Tutorial five: Topics](http://www.rabbitmq.com/tutorial-five-python.html)

{'fraction_non_alphanumeric': 0.12683746325073497, 'fraction_numerical': 0.01133977320453591, 'mean_word_length': 3.8024193548387095, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 2, 'lorem ipsum': 0, 'www.': 12, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4283277', 'n_tokens_mistral': 897, 'n_tokens_neox': 789, 'n_words': 215}