hi all,
i have captcha image on Registration popup but on local the captcha image and code is not coming.
i have install RMagick and gd2 gem also.It gives following error,
MissingSourceFile (no such file to load – GD):
lib/captcha_image.rb:22
app/controllers/login_controller.rb:385:in sign_up' -e:2:in load’
-e:2
hi all,
is any one know how to use captcha on locally ? i am using following ror environment,
ruby 1.8.7 (2011-02-18 patchlevel 334) [i386-mingw32],
Rails 2.3.11
gem ‘recaptcha’, :require => ‘recaptcha/rails’
put you api keys in config/environment.rb filr
ENV[‘RECAPTCHA_PUBLIC_KEY’] =
‘xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx’
ENV[‘RECAPTCHA_PRIVATE_KEY’] =
‘xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx’
you can verify recaptcha conditions in controller methods by
verify_recaptcha varible
ex:-
if !verify_recaptcha
#do operations
end
i am now using the reCaptcha plugin in my application but one issue is there when i submit the form value without/with
captcha value in below condition it goes in if only
if !verify_recaptcha
else
end
can you know why it is executing if only and not else.