Recaptcha undefined problem

There are various places where we have added recaptcha in our rails app. Afer deploying to staging environment, I realized it wasn’t working properly and Firebug captured this error:

Recaptcha is not defined

So comparing what could be different between my dev environment and the staging environment, I saw the portion of the app where recaptcha was failed a secure page. So the fix is rather simple:


<%= captcha_tags(:ssl => true) %>

Furthermore, just to be on safe side, in other portions of the apps as well I was calling this captcha. So i added a helper method like this:


def recaptcha_tags_helper(options = {})
options.merge!(:ssl => true) if request.ssl?
recaptcha_tags(options)
end


This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

4 Responses to “Recaptcha undefined problem”

Leave a Reply