Today while working with mysql2 gem, I ran into
“SL connection error: error:00000001:lib(0):func(0):reason(1)”
which was specific to only my machine, apart from the other devs.
I have Mac OS X, with rbenv managing my rubies. I was using brew as the package manager.
I was trying to access remote database over mysql2 connect. I went on to read the internals of mysql2, which gave no answers, and then onto the openssl gem form ruby sources, with vain.
Finally, what gave way was unistalling and unlinking openssl package from brew. After which reinstalling my ruby, gave way for accessing without certificate errors.
I l need to search more, for what was messing up with the whole setup, but somehow my ruby was using wrong paths for .pem files, from brew installation.