when running a Rails server, I get the following error: no such file to load -- openssl
I try a solution I find online. I go to ~/.rvm/src/ruby-1.9.2-head/ext/openss
This solved the problem for me:
rvm pkg install openssl
rvm reinstall 1.9.2 --with-openssl-dir=$rvm_path/usr
And don't forget to change the ruby version to your version you are using. If you have an old rvm you may should update this at first too.
check this instruction http://rvm.io/packages/openssl/ - keep in mind that the Quick fix is just one block not the whole page.
Try the below steps.
if you already have ruby version use
rvm reinstall ruby-2.0.0 --with-openssl-dir=$HOME/.rvm/usr
For ubuntu, I did the following:
apt-get install libssl-dev
cd ruby-1.9(source directory used to install ruby)/ext/openssl
ruby extconf.rb
make
make install