Rails 3 - no such file to load -- openssl

29,717

Solution 1

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/

Solution 2

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

Solution 3

You have to install library for openssl/net/http run the following code and then install openssl and iconv.. Following code will work on UBUNTU..

sudo apt-get install libopenssl-ruby1.9.1 this is for ruby 1.9.1.

sudo apt-get install libopenssl-ruby for ruby 1.8.x

Solution 4

first check your rvm having the openssl package. Go to /usr/local/src/rvm/ruby-1.9.2-p290/

then go to ext/openssl.

type ruby extconf.rb If we found errors like this

enter code here
=== 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

Then install apt-get install libssl-dev.Once installed rub ruby extconf.rb.Now the openssl will get installed

Solution 5

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
Share:
29,717
Admin
Author by

Admin

Updated on July 09, 2022

Comments

  • Admin
    Admin almost 2 years

    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.