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 1.9.2.180p

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 config.ru 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.

Best

Martin

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,

Peter

MARTIN!!

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

Graciously yours,

Curtis