Before creating Ruby or Gem, the following Debian / Ubuntu packages must be installed:
$ sudo apt-get install build-essential bison openssl libreadline5 libreadline5-dev curl git-core zlib1g zlib1g-dev libssl-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libmysqlclient-dev
If you created Ruby or Gem without some of the installed packages, you will need to rebuild them.
Then the error No such file to load -- openssl will be fixed. Change to the Ruby source directory, for example. ruby-1.9.2-p180/ .
$ cd ext/openssl $ make $ sudo make install
source share