DEV Community

Cover image for install gem invisible_captcha with devise
Yaroslav Shmarov
Yaroslav Shmarov

Posted on • Originally published at blog.corsego.com on

3 2

install gem invisible_captcha with devise

You need a captcha tool in your app.

Why? For fewer bot sign-ups!

You don't need Google Recaptcha in your app:

Instead - try an open source Ruby alternative!

Quick guide to add gem invisible_captcha to your devise registrations:

gemfile:

gem 'invisible_captcha'
Enter fullscreen mode Exit fullscreen mode

console:

bundle
rails g devise:controllers users -c=registrations
Enter fullscreen mode Exit fullscreen mode

app/controllers/users/registrations_controller.rb

class Users::RegistrationsController < Devise::RegistrationsController
  invisible_captcha only: [:create]
Enter fullscreen mode Exit fullscreen mode

routes.rb:

  devise_for :users, controllers: {
    registrations: 'users/registrations'
  }
Enter fullscreen mode Exit fullscreen mode

app/views/devise/registrations/new.html.erb, inside the form:

<%= invisible_captcha %>
Enter fullscreen mode Exit fullscreen mode

That's it! And no dependency on external API!

invisible-recaptcha-gem
spam detected


Alternative wiki to install Google REcaptcha gem

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more