FYI: Heroku Cedar, pg, openssl, omniauth, troubles and a solution

Hi guys,

I found a really nasty issue that affects people running on Heroku’s cedar stack. We are using Rails 3.1.rc5, pg 11, omniauth 2.6. Ruby is

Basically there is an incompatibility between the http, pg and OpenSSL modules which segfaults when making https calls, for example to log in through twitter. Now pg is a required gem when using Heroku cedar stack so leaving that one out is not an option. What fixed this was to add the following to my at the top:

require ‘pg’

require ‘openssl’

This ensures that pg is required before openssl and all is good now.

Hope this helps others in similar situations.



FWIW, I ran into this back on (I think) rc1 and had the problem locally as well. There was a bug noted somewhere on the ruby bug tracker relating to it - sorry I don’t have the url offhand. Thanks very much for the fix - good to know!

Best Wishes,



Thank you - this is exactly the kind of thing that our mailing list is for. Thank you for demonstrating exemplarily citizenship.

Graciously yours,