Ruby on Rails
Backend

EU CAPTCHA for Ruby on Rails

Ruby on Rails is an open-source web application framework written in Ruby, focused on convention over configuration and developer happiness for building database-backed web applications. Protect your Rails forms from bots and spam with a privacy-first, EU-hosted CAPTCHA using the official Ruby client.

Why choose Myra EU CAPTCHA?

  • Interaction-free user experience

    No puzzles, no clicks – invisible bot protection with zero user friction.

  • Digital sovereignty made in Germany

    Fully GDPR-compliant, no cookies, no tracking – developed and hosted in Germany.

  • Intelligent threat detection

    Smart protection trained by more than 100 billion daily Myra CDN signals.

  • Proven technology

    Over 5 billion successfully secured authentication attempts.

How the integration works

  1. 1. Create an EU CAPTCHA account

    Creating an account is completely free, all you need is a valid email address and you’re ready to go. Choose a plan that covers your needs. The first 3 months are free of charge.

    Create an Account
  2. 2. Create a sitekey

    Create a sitekey in the EU CAPTCHA dashboard for the domain you want to protect. Provide a clear label so you can easily identify it later. This sitekey links the widget on your Ruby on Rails application to your EU CAPTCHA account.

  3. 3. Add EU CAPTCHA to your form

    Load verify.js and place the EU CAPTCHA widget div with your sitekey inside any HTML form you want to protect — the response token is automatically included on submission.

    View HTML integration guide
  4. 4. Verify the token in your Ruby backend

    In your Rails controller action or Ruby request handler, retrieve the eu-captcha-response token and validate it against the EU CAPTCHA API before processing any submission.

    View Ruby verification guide

5. The EU CAPTCHA widget will appear on your form.

Verified

Frequently Asked Questions

  • How do I verify a CAPTCHA token in Ruby on Rails?

    Add the EU CAPTCHA Ruby gem to your Gemfile and run bundle install. Create a Rails initializer to configure the client with your secret key. In your controller action, read params[:eu_captcha_response], call the client's verify method, and redirect back with an error message if verification fails or proceed with the form data if it succeeds.

  • Is there an official EU CAPTCHA Ruby gem?

    Yes. EU CAPTCHA provides an official Ruby client generated from the OpenAPI specification. Add it to your Gemfile and run bundle install. The gem supports Ruby 2.7 and later and provides an idiomatic Ruby interface for calling the EU CAPTCHA verification API.

  • How do I add EU CAPTCHA to a Rails controller action?

    In your create or update action, read the eu-captcha-response token from the params hash. Call the EU CAPTCHA client's verify method with your secret key and the token. If verification fails, add an error to the model or flash and re-render the form. If it succeeds, proceed with saving the record or processing the submission.

  • Can I use EU CAPTCHA with a Rails before_action callback?

    Yes. Define a private method in your controller that performs the EU CAPTCHA verification and add it as a before_action for the actions you want to protect. If verification fails, the before_action renders an error response and prevents the main action from running, keeping your controller actions clean and DRY.

  • Does EU CAPTCHA work with Sinatra or other Ruby frameworks?

    Yes. The EU CAPTCHA Ruby client is framework-agnostic and works with Sinatra, Hanami, Grape, or any other Ruby web framework. In a Sinatra route, read the eu-captcha-response from the params hash, call the client's verify method, and halt with an error status if verification fails.

  • How do I configure the EU CAPTCHA client in a Rails initializer?

    Create a file at config/initializers/eu_captcha.rb. Inside, configure the EU CAPTCHA client with your secret key, reading it from Rails credentials or an environment variable using ENV['EU_CAPTCHA_SECRET_KEY']. Never hardcode the secret key in source code that is committed to version control.

  • Is EU CAPTCHA GDPR compliant for Ruby on Rails applications?

    Yes. EU CAPTCHA is operated by an EU-based company, is hosted entirely in Germany, and does not rely on US cloud providers or infrastructure subject to US surveillance laws. The service processes only the data necessary to provide and verify the CAPTCHA (such as IP address and technical browser information) in line with GDPR Article 28. Your organization remains responsible for providing transparent privacy information, selecting an appropriate legal basis, and obtaining any required consent for your specific implementation. This information does not constitute legal advice; please consult your legal counsel for an assessment of your individual case.

Ready for a better CAPTCHA?

Experience invisible bot protection with privacy‑first, GDPR‑compliant verification made and hosted in Germany. Try Myra EU CAPTCHA now 3 months for free and secure your web forms without adding friction for your users.

Privacy-first technology

We guarantee zero data transfer to third-country jurisdictions.

Read our privacy policy

Fast and easy setup

We offer ready-made integrations for many CMS and popular frameworks.

Read our quick start guide