Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenSSL::SSL::SSLError on Heroku #26

Closed
sunny opened this issue Mar 17, 2023 · 3 comments · Fixed by #27
Closed

OpenSSL::SSL::SSLError on Heroku #26

sunny opened this issue Mar 17, 2023 · 3 comments · Fixed by #27

Comments

@sunny
Copy link
Contributor

sunny commented Mar 17, 2023

When using Heroku’s default stack, using this gem generates an SSL error.

This is due to Ruby not being able to find the certification authority certificates (CA Certs) used to verify the authenticity of the request.

@sunny
Copy link
Contributor Author

sunny commented Mar 17, 2023

To fix it, you can add the following:

OpenWeather.configure do |config|
  config.ca_file = ENV["OPENWEATHER_API_CA_FILE"] if ENV["OPENWEATHER_API_CA_FILE"]
end

And configure the path to the CA certificate on Heroku:

heroku config:set OPENWEATHER_API_CA_FILE=/usr/lib/ssl/certs/ca-certificates.crt

@sunny sunny closed this as completed Mar 17, 2023
@dblock
Copy link
Owner

dblock commented Mar 17, 2023

I believe we need a fix like slack-ruby/slack-ruby-client#416 here. Want to contribute it @sunny?

@sunny
Copy link
Contributor Author

sunny commented Mar 21, 2023

Thanks for the swift reviews and merges!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants