Andrzej Gis
Andrzej Gis

Reputation: 14316

Recaptcha error

I have a problem with Recaptcha gem. I'm using Ubuntu on a virtual machine (VirtualBox). It uses bridged network interface card, so I have internet access there and I can see this Ubuntu from my host computer.

When I run rails s and than go to

Input error: Invalid referer is where the box is supposed to be.

Why is it like that and how to fix this?

Upvotes: 2

Views: 953

Answers (1)

Mr. Black
Mr. Black

Reputation: 12122

But, when we tried to host the same application to any server with the same pair of keys, it will not generate an error but, it will display like "input error - invalid referer" instead of captcha in your form.

Because, when we are getting the pair of keys from Google API, we will specify the domain name there. In that, to use those keys in your local system, we will enter domain as "localhost". But, these pair of keys will not work when we deploy that application in any server.

So, for the application to work in the remote host, we should get the pair of keys from Google API with the domain name, where we are going to deploy your application. And use them in your application.

Note: We can have a new pair of keys for recaptcha using following link:
http://www.google.com/recaptcha/whyrecaptcha

Upvotes: 2

Related Questions