Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails 3 - no such file to load -- openssl

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/openssl. I type : ruby extconf.rb, but I get the following:

=== OpenSSL for Ruby configurator === === Checking for system dependent stuff... === checking for t_open() in -lnsl... no checking for socket() in -lsocket... no checking for assert.h... yes === Checking for required stuff... === checking for openssl/ssl.h... no === Checking for required stuff failed. === Makefile wasn't created. Fix the errors above. 

I cannot use make nor make install.

like image 771
Bart Avatar asked Aug 12 '10 01:08

Bart


2 Answers

rvm pkg install openssl (older format - rvm package install openssl)
rvm pkg install iconv (older format - rvm package install iconv)
rvm remove 1.9.2
rvm install 1.9.2 -C --with-openssl-dir=$HOME/.rvm/usr,--with-iconv-dir=$HOME/.rvm/usr

Credit to http://www.isnull.com.ar/

like image 189
Ken Ratanachai S. Avatar answered Sep 18 '22 15:09

Ken Ratanachai S.


check this instruction http://rvm.io/packages/openssl/ - keep in mind that the Quick fix is just one block not the whole page.

like image 37
Reactormonk Avatar answered Sep 21 '22 15:09

Reactormonk