Rails 3 - no such file to load — openssl

前端 未结 10 1278
忘了有多久
忘了有多久 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条回答
  • 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.

    0 讨论(0)
  • 2020-12-04 17:08

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

    0 讨论(0)
  • 2020-12-04 17:11

    Try the below steps.

    1. rvm get stable
    2. brew install libyaml
    3. rvm pkg install openssl
    4. rvm install ruby-2.0.0 --with-openssl-dir=$HOME/.rvm/usr
    5. rvm use ruby-2.0.0

    if you already have ruby version use

    rvm reinstall ruby-2.0.0 --with-openssl-dir=$HOME/.rvm/usr

    0 讨论(0)
  • 2020-12-04 17:12

    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
    
    0 讨论(0)
提交回复
热议问题