Rails 3 - no such file to load — openssl

前端 未结 10 1340
忘了有多久
忘了有多久 2020-12-04 16:43

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

10条回答
  •  囚心锁ツ
    2020-12-04 17:03

    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

提交回复
热议问题