Note: Calls to rubygems.org are deprecated – proceed with caution!
I had the same issue on Mac OSX after also building ruby2.1.0p0 from the source. I already had openssl installed. It appears that the reference in gems needed refreshing. I ran:
gem source -r https://rubygems.org/
to remove
followed by
gem source -a https://rubygems.org/
to read
After this, I was able to run gems install bundler
successfully.
If you run into further errors, you can try ./configure --with-openssl-dir=/usr/local/ssl
in your ruby downloaded dir/.