Ryan Murphy
Ryan Murphy

Reputation: 842

Simple Captcha Error

I am trying to use the simple-captcha gem with

gem "galetahub-simple_captcha", :require => "simple_captcha".

I am running Rails 5.0.0.1 and Ruby 2.3.2.

I couldn't get it to work in my app so I created a clean skin, rails new, rails generate scaffold User, rake db:migrate etc. As soon as I add the gem, I can bundle install fine, but as soon as I run rails test or rails generate or anything I get this error:

user/.rvm/gems/ruby-2.3.3/gems/galetahub-simple_captcha-0.1.5/lib/simple_captcha/form_builder.rb:7:in `included': uninitialized constant Sprockets::Helpers (NameError)

I have tried following the setup instructions for the gem, which says to run rails generate captcha after installing the gem, but as soon as I have installed the gem I get the error.

Any help would be appreciated.

On the other hand if anyone thinks there is a better captcha I should be using for form submission, let me know.

Upvotes: 0

Views: 343

Answers (3)

user9542422
user9542422

Reputation:

What happens after the simple captcha is installed?

Upvotes: 0

kajal ojha
kajal ojha

Reputation: 1278

You can use Recaptcha gem as advised by Alex

There is nice tutorial for this https://www.sitepoint.com/quick-tip-add-recaptcha-to-your-rails-application/

Upvotes: 0

Alex Kojin
Alex Kojin

Reputation: 5204

Looks like latest commit to "simple_captcha" repository was 3 years ago. It's outdated and maybe it will be not worked with Rails 5.

You can use Recaptcha from Google https://github.com/ambethia/recaptcha

Upvotes: 1

Related Questions