views:

410

answers:

1

I just checked out this answer: http://stackoverflow.com/questions/1076600/rails-recaptcha-plugin-always-returns-false

but it didn't seem to help. I'm trying to run recaptcha on rails on my local machine. The site says the API keys should work for prod and local. I've checked the keys many times and have even tried "workarounds" where you explicitly feed in the pub/priv key (since I'm running on windows). I just wanted to know if there's a known issue with windows, or if there's an issue with running on localhost, or if this plugin is out of date? Thanks.

I'm always getting the error that my captcha is wrong. I even tried the sound type, still wrong. Apologies if this is just a silly question, I just wanted to rule out everything that may be a known issue.

A: 

When getting an API key for ReCaptcha a domain must be specified. localhost won't work but your hostname should. As the recaptcha site says:

By default, your reCAPTCHA key is restricted to the specified domain, and any subdomains for additional security

Find out your hostname at the following link and use it as the domain for you API keys:

http://whatismyipaddress.com/staticpages/index.php/what-is-my-hostname

My provider happens to be Comcast, so I created a global API key for comcast.net

https://admin.recaptcha.net/recaptcha/createsite/

pygorex1