Does anyone have any suggestions for a best practice implementation of
Recaptcha (or other captchas - if you recommend going another route, I'm
all ears)? I've found the recaptcha gem and a plugin but I don't know
which is the best implementation, and I haven't found a thorough
tutorial plus example code for either.
Thanks, Schalk. I liked the idea of the plugin (I prefer plugins because
I can jump right in to the code on which the app is dependent) but the
gem seemed easy enough. However, I've followed the instructions and I'm
stuck on this;
...because I thought it was best to keep the environment.rb free of
these things. I've tried putting it in the environment.rb, but that just
breaks, too (same error). Where am I going wrong?! Mongrel loads if I
don't include the RecaptchaClient.new.
RubyGems will revert to legacy indexes degrading performance.
Successfully installed recaptcha-0.1.49
1 gem installed
Installing ri documentation for recaptcha-0.1.49...
Installing RDoc documentation for recaptcha-0.1.49...
Thanks, Schalk. I liked the idea of the plugin (I prefer plugins
because
I can jump right in to the code on which the app is dependent) but the
gem seemed easy enough. However, I've followed the instructions and
I'm
stuck on this;
I used that gem once. I ended up requiring the gem from an initializer
and reopening this class:
module ReCaptcha
module AppHelper
RCC_PUB = 'your key here'
RCC_PRIV = 'your key here'
end
end
which seemed to work. I vaguely recall the setup instructions being a
bit out of date
Thanks, Schalk. I liked the idea of the plugin (I prefer plugins
because
I can jump right in to the code on which the app is dependent) but
the
gem seemed easy enough. However, I've followed the instructions and
I'm
stuck on this;
I used that gem once. I ended up requiring the gem from an
initializer
and reopening this class:
module ReCaptcha
module AppHelper
RCC_PUB = 'your key here'
RCC_PRIV = 'your key here'
end
end
which seemed to work. I vaguely recall the setup instructions being a
bit out of date
Fred
Thanks Fred. Since the last post I've moved to the plugin, however,
I'm
struggling with that one, too. It should be insanely simple; I just
need
to set the public and private keys as variables in the environment.rb
(or an initializer, if applicable) - but I just can't get it to work;
The best is always hard to define depending on personal opinion which
is extremely variant from one to another. Choose something you
yourself feels comfortable with and then go through the documentation
and install. I've seen that ReCAPTCHA can be used with Ruby on Rails
and trying "Recaptcha Ruby Rails" into google got me this result: Dead Programmer Society: Recaptcha On Rails
which seems fairly detailed.
The best is always hard to define depending on personal opinion which
is extremely variant from one to another. Choose something you
yourself feels comfortable with and then go through the documentation
and install. I've seen that ReCAPTCHA can be used with Ruby on Rails
and trying "Recaptcha Ruby Rails" into google got me this result:
http://deadprogrammersociety.blogspot.com/2008/02/recaptcha-on-rails.html
which seems fairly detailed.
-----
Ryan Bigg
Freelancer
http://frozenplague.net
Thanks Ryan. That tutorial looks handy. I managed to implement the
plugin in the same way that hte tutorial describes (if only I had had it
at the time). I've seen very little on the spec/test front on
integrating recaptcha. Maybe it's not so important, then?