2

I am using Ruby on Rails 3.0.7 and I would like to add captcha to my forms.

What do you advice? What is "the best" and the most widely used captcha system for Ruby on Rails applications? Where I can find some good documentation?

user502052
  • 14,803
  • 30
  • 109
  • 188

5 Answers5

4

Personally I'm not a fan of recaptcha, simply because I find the text so hard to read - even though it's for a good cause etc..

Have you considered doing something like asking a simple question instead (what is 4 plus 2), or another good one I've seen is a jquery slider that you have to move to prove you're human.

If you do want to stick with a captcha system, also check out Recommendations for a captcha on Ruby on Rails

Community
  • 1
  • 1
Matt Roberts
  • 26,371
  • 31
  • 103
  • 180
  • I personally despise captcha and agree with Matt here. Asking question or a slider would be much more preferable in my opinion. – Midwire Jun 27 '11 at 19:45
  • What makes you think a person cannot automate slider moving with javascript? or you think computers cannot calculate 4+2? :P but OCR is something computers struggle on.. Note that people put captchas on their site.. so people don't over create acocunts.. if you site is targetted.. i'm pretty sure math and slider idea will fail.. – SSpoke Jun 27 '11 at 20:06
1

Please visit the link https://github.com/galetahub/simple-captcha will describe more about simple-captcha

Vijay Chouhan
  • 4,613
  • 5
  • 29
  • 35
1

I used rack-recaptcha which is a great gem and it is very easy to use, you can find the doc at github but it is pretty simple:

Gemfile:

gem 'rack-recaptcha', :require => 'rack/recaptcha'

Application.rb:

class Application < Rails::Application
# ...
  config.gem 'rack-recaptcha', :lib => 'rack/recaptcha'
  config.middleware.use Rack::Recaptcha, :public_key => 'KEY', :private_key => 'SECRET'
end

NOTE: You can get your public and private keys in the recaptcha page

Application_helper.rb or whatever helper you want it in.

module ApplicationHelper
  include Rack::Recaptcha::Helpers
end

Application_controller.rb or whatever controller you want it in.

module ApplicationController
  include Rack::Recaptcha::Helpers
end

That is all the setup that you will need for it to work. It also has a test mode, simply add Rack::Recaptcha.test_mode! :return => false to your spec helper.

I really encourage you to check the full doc.

Hope it works for you :)

rogeliog
  • 3,632
  • 4
  • 27
  • 26
0

I have used recaptcha in a RoR project and it is working fine in production without any issues. I would recommend that.

For a list of available options, look here

dexter
  • 13,365
  • 5
  • 39
  • 56
-1

Don't know much about Ruby on rails but I know ReCpatcha is most easiest and it's ran by google so you know it's good haha

found a link http://ambethia.com/recaptcha/

SSpoke
  • 5,656
  • 10
  • 72
  • 124
  • I also use ReCaptcha and it was easy to integrate in our Rails App. I think it is a good one, because many people are familiar with it and it is save. – Bjoernsen Jun 27 '11 at 07:16