{ "html": "
Raven Ruby comes as a gem and is straightforward to install. If you are\nusing Bundler just add this to your Gemfile
:
gem "sentry-raven"\n
For other means of installation see Installation.
\nTo use Raven Ruby all you need is your DSN. Like most Sentry libraries it\nwill honor the SENTRY_DSN
environment variable. You can find it on\nthe project settings page under API Keys. You can either export it as\nenvironment variable or manually configure it with Raven.configure
:
Raven.configure do |config|\n config.dsn = '___DSN___'\nend\n
If you use Rails, Rake, Sidekiq, etc, you’re already done - no more\nconfiguration required! Check Integrations for more details on\nother gems Sentry integrates with automatically.
\nRack requires a little more setup: Rack (Sinatra etc.)
\nOtherwise, Raven supports two methods of capturing exceptions:
\nRaven.capture do\n # capture any exceptions which happen during execution of this block\n 1 / 0\nend\n\nbegin\n 1 / 0\nrescue ZeroDivisionError => exception\n Raven.capture_exception(exception)\nend\n