Skip to content
This repository has been archived by the owner on Jun 7, 2021. It is now read-only.

Rails 3: Recaptcha Errors #30

Closed
harmsk opened this issue Nov 19, 2011 · 1 comment
Closed

Rails 3: Recaptcha Errors #30

harmsk opened this issue Nov 19, 2011 · 1 comment

Comments

@harmsk
Copy link

harmsk commented Nov 19, 2011

I tried to track this down...

I've added my Recaptcha keys to application_config.rb
configatron.require_captcha_on_signup = true
configatron.recaptcha_pub_key = '_...'
configatron.recaptcha_priv_key = '
_...'

However, when rendering the views you'll get this error: Input error: k: Format of site key was invalid
which isn't surprising given that in the source there's this: <script type="text/javascript" src="http://www.google.com/recaptcha/api/challenge?k=#<Configatron::Store:0x7f757add7628>&error=expression"></script>

So I created my own config/initializers/recaptcha_constants.rb and now everything is working just fine!

It seems like there is a problem with the initialization order or something... but I couldn't quite figure it out.

@bborn
Copy link
Owner

bborn commented Nov 28, 2011

This issue is fixed on the Rails 3 branch. See this commit: b8e9234

@bborn bborn closed this as completed Nov 28, 2011
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants