Closed eric-hu closed 13 years ago
Perhaps this is the wrong place for this, but I just wanted to point out that the rails setup instructions didn't work for me. I had to tweak the following code:
## environment.rb: config.gem 'rack-recaptcha', :lib => 'rack/recaptcha' config.middleware.use Rack::Recaptcha, :public_key => 'KEY', :private_key => 'SECRET', :paths => 'PATH'
That gave me the following error:
undefined local variable or method `config' for main:Object (NameError)
I just needed to pre-pend the config... part with "Rails.application."
Rails.application.config.gem 'rack-recaptcha', :lib => 'rack/recaptcha' Rails.application.config.middleware.use Rack::Recaptcha, :public_key => 'KEY', :private_key => 'SECRET', :paths => 'PATH'
i've updated the README. these configurations should have been in the application.rb, not environment.rb. thanks
Perhaps this is the wrong place for this, but I just wanted to point out that the rails setup instructions didn't work for me. I had to tweak the following code:
That gave me the following error:
I just needed to pre-pend the config... part with "Rails.application."