<commit_before>.. sentry:edition:: self

    Raven Ruby
    ==========

.. sentry:edition:: hosted, on-premise

    .. class:: platform-ruby

    Ruby
    ====

Raven for Ruby is a client and integration layer for the Sentry error
reporting API.  It supports Ruby MRI 1.8.7/REE, 1.9.3, 2.0, 2.1 and 2.2.
JRuby support is provided but experimental.

Installation
------------

Raven Ruby comes as a gem and is straightforward to install.  If you are
using Bundler just add this to your ``Gemfile``:

.. sourcecode:: ruby

    gem "sentry-raven"

For other means of installation see :ref:`install`.

Configuration
-------------

To use Raven Ruby all you need is your DSN.  Like most Sentry libraries it
will honor the ``SENTRY_DSN`` environment variable.  You can find it on
the project settings page under API Keys.  You can either export it as
environment variable or manually configure it with ``Raven.configure``:

.. sourcecode:: ruby

    Raven.configure do |config|
      config.dsn = '___DSN___'
    end

Reporting Failures
------------------
<commit_msg>Fixed a bad reference.<commit_after>.. sentry:edition:: self

    Raven Ruby
    ==========

.. sentry:edition:: hosted, on-premise

    .. class:: platform-ruby

    Ruby
    ====

Raven for Ruby is a client and integration layer for the Sentry error
reporting API.  It supports Ruby MRI 1.8.7/REE, 1.9.3, 2.0, 2.1 and 2.2.
JRuby support is provided but experimental.

Installation
------------

Raven Ruby comes as a gem and is straightforward to install.  If you are
using Bundler just add this to your ``Gemfile``:

.. sourcecode:: ruby

    gem "sentry-raven"

For other means of installation see :doc:`install`.

Configuration
-------------

To use Raven Ruby all you need is your DSN.  Like most Sentry libraries it
will honor the ``SENTRY_DSN`` environment variable.  You can find it on
the project settings page under API Keys.  You can either export it as
environment variable or manually configure it with ``Raven.configure``:

.. sourcecode:: ruby

    Raven.configure do |config|
      config.dsn = '___DSN___'
    end

Reporting Failures
------------------

{'fraction_non_alphanumeric': 0.12517580872011252, 'fraction_numerical': 0.011251758087201125, 'mean_word_length': 2.817531305903399, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '1402510', 'n_tokens_mistral': 656, 'n_tokens_neox': 611, 'n_words': 271}