If you are building Ruby by hand on Debian and you need OpenSSL support, make sure to install the libssl-dev package (sudo aptitude install libssl-dev). The tricky part is that even if you don’t install it, configuring the Ruby build with OpenSSL (./configure --with-openssl ...) will not complain that the necessary libraries are missing. Why? Here is someone’s guess in the ruby IRC room (I can’t remember if I was in ruby or ruby-lang):
peshalto: I remember long ago when encryption libraries were always supplied as stubs to deal with export restrictions. not sure if that’s still done today. with a fake library stub in place, a compile would go along happily and you’d never know that the encryption was disabled. peshalto: could that still be the case today? i wonder if it’s picking up a stub from somewhere and not finding the real library you installed.
Thanks for your post! This issue found me today. The Ruby source code includes an openssl directory and make quite happily reports compiling openssl, which must be a stub. It’s only when you require openssl (e.g. in Rails 2 for the cookie sessions) that you find it doesn’t work.
..then you go through a head scratching phase that leads to the discovery that you need to install the obtusely named libssl-dev package to resolve :-)