Cannot set simple_captcha produces uninitialized constant stars :: Helpers

I have included the simple_captcha gem as indicated on their website:

gem 'simple_captcha', :git => 'git://github.com/galetahub/simple-captcha.git' 

Then I run bundler to install it.

Finally, when I go to run the following command, I get an error message:

  rails generate simple_captcha .rvm/gems/ ruby-1.9.3-p327@eapi4 /bundler/gems/simple-captcha-e99cc7e8bf6b/lib/simple_captcha/form_builder.rb:7:in `included': uninitialized constant Sprockets::Helpers (NameError) 

I searched the Internet and cannot find other users with this problem.

Any help appreciated

+4
source share
2 answers

They say in this pull request that the plugin does not support rails 4, you can load your branch and try it.

Looking at diff, it shows your problem.

 - base.send(:include, Sprockets::Helpers::RailsHelper) - base.send(:include, Sprockets::Helpers::IsolatedHelper) + base.send(:include, Sprockets::Rails::Helper) 

https://github.com/galetahub/simple-captcha/pull/39/files

+8
source

you could do this since the previous version of simple_captcha is not supported on rails 3.

Azdaroth forked of simple_captcha

 gem 'simple_captcha', :git => 'git://github.com/Azdaroth/simple-captcha.git', :branch => 'rails-4' 
+3
source

Source: https://habr.com/ru/post/1498806/


All Articles