I think you are missing gem,
Add this line to Gemfile then run bundle install
gem "recaptcha", "~> 5.12"
then create initializer file with these content
Recaptcha.configure do |config|
config.site_key = Rails.application.credentials.dig(:google_recaptcha, :site_key)
config.secret_key = Rails.application.credentials.dig(:google_recaptcha, :secret_key)
# Uncomment the following line if you are using a proxy server:
# config.proxy = 'http://myproxy.com.au:8080'
# Uncomment the following lines if you are using the Enterprise API:
# config.enterprise = true
# config.enterprise_api_key = 'AIzvFyE3TU-g4K_Kozr9F1smEzZSGBVOfLKyupA'
# config.enterprise_project_id = 'my-project'
end
Add this in your slim file
= recaptcha_tags(noscript: false)
This should work.