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 -- Posted via ruby-forum.com. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Neil Cauldwell wrote:> 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. > > ThanksNo ideas? -- Posted via ruby-forum.com. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I have implemented Recaptcha on the registration page of this site: satechevents.co.za/account/register I am using the gem here: loonsoft.com/recaptcha Schalk Neil Cauldwell wrote:> Neil Cauldwell wrote: >> 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 > > No ideas?--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Schalk Neethling wrote:> I have implemented Recaptcha on the registration page of this site: > satechevents.co.za/account/register > > I am using the gem here: > loonsoft.com/recaptcha > > SchalkThanks, 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; /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:278:in `load_missing_constant'': uninitialized constant RecaptchaClient (NameError) How are you including the gem? I created an initializer (recaptcha_credentials.rb) with this inside; RecaptchaClient.new(:rcc_pub=>''my_code'', :rcc_priv=>''my_code'') ...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. Also, I saw this when I was installing the gem; WARNING: RubyGems 1.2+ index not found for: loonsoft.com/recaptcha/pkg 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... Cheers -- Posted via ruby-forum.com. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 3 Oct 2008, at 14:15, Neil Cauldwell wrote:> > Schalk Neethling wrote: >> I have implemented Recaptcha on the registration page of this site: >> satechevents.co.za/account/register >> >> I am using the gem here: >> loonsoft.com/recaptcha >> >> Schalk > > 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> /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active_support/ > dependencies.rb:278:in > `load_missing_constant'': uninitialized constant RecaptchaClient > (NameError) > > How are you including the gem? I created an initializer > (recaptcha_credentials.rb) with this inside; > > RecaptchaClient.new(:rcc_pub=>''my_code'', :rcc_priv=>''my_code'') > > ...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. > > Also, I saw this when I was installing the gem; > > WARNING: RubyGems 1.2+ index not found for: > loonsoft.com/recaptcha/pkg > > 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... > > Cheers > -- > Posted via ruby-forum.com. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung wrote:> On 3 Oct 2008, at 14:15, Neil Cauldwell wrote: > >> 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 > > FredThanks 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; pastie.org/284245 I can hack the plugin to use the keys as strings without using variables (means removing an ''unless'' condition, too), but that defeats the point of a well test plugin. Can you see what I''m doing wrong here? -- Posted via ruby-forum.com. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 3 Oct 2008, at 15:21, Neil Cauldwell wrote:> > Frederick Cheung wrote: >> On 3 Oct 2008, at 14:15, Neil Cauldwell wrote: >> >>> 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; > > pastie.org/284245 >If you''re going that way you need to set ENV[''RECAPTCHA_PUBLIC_KEY''], which is not the same thing as RECAPTCHA_PUBLIC_KEY Fred> I can hack the plugin to use the keys as strings without using > variables > (means removing an ''unless'' condition, too), but that defeats the > point > of a well test plugin. Can you see what I''m doing wrong here? > > -- > Posted via ruby-forum.com. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung wrote:> On 3 Oct 2008, at 15:21, Neil Cauldwell wrote: > >>>> stuck on this; >>> end >> 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; >> >> pastie.org/284245 >> > If you''re going that way you need to set ENV[''RECAPTCHA_PUBLIC_KEY''], > which is not the same thing as RECAPTCHA_PUBLIC_KEY > > FredThank you, this works like a charm; ENV[''RECAPTCHA_PUBLIC_KEY''] = ''some_key''; -- Posted via ruby-forum.com. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
And should I be using any specs for recaptcha? I struggled to find much through a Googling... -- Posted via ruby-forum.com. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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: deadprogrammersociety.blogspot.com/2008/02/recaptcha-on-rails.html which seems fairly detailed. ----- Ryan Bigg Freelancer frozenplague.net On 03/10/2008, at 6:15 PM, Neil Cauldwell wrote:> > Neil Cauldwell wrote: >> 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 > > No ideas? > -- > Posted via ruby-forum.com. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ryan Bigg wrote:> 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: > deadprogrammersociety.blogspot.com/2008/02/recaptcha-on-rails.html > which seems fairly detailed. > ----- > Ryan Bigg > Freelancer > frozenplague.netThanks 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? -- Posted via ruby-forum.com. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---