Revert "Only use https on production"

This reverts commit 3ae5b0d0cac2f5c4bc63ebab1778d8328c0087b9.
Revert "Use https by default"

This reverts commit 1578b347453d207022168a57dd9bdbc9a010e300.
Require rubygems
Fix extensions initialization
Add support for domain protocol specification