3

I am getting the no such file to load — openssl error on OSX 10.7.5 in a Ruby on Rails environment.

I read all the related questions here on StackOverflow, but nothing worked for me.

Tried the following:

  1. Tried building with openssl specified. Did not work:

    rvm pkg install openssl
    rvm reinstall 1.9.2 --with-openssl-dir=$rvm_path/usr

  2. Also tried with the system's OpenSSL. Didn't work, too:

    which openssl
    /opt/local/bin/openssl
    rvm reinstall 1.9.2 --with-openssl-dir=/opt/local/bin

    3.Read that libyaml is required. I've already have it:

    brew install libyaml
    libyaml-0.1.4 already installed

Other info : My system has ruby version 1.8.7. Everything works (including load SSL) when I use that Ruby. But it is too old for some of the gems I am using. So, I have installed all other versions using RVM. I have also made the necessary environment changes. I tried all these steps with 1.9.2, 1.9.3 both. But same no such file to Load - OpenSSL error.

What am I missing?

Sled
  • 18,541
  • 27
  • 119
  • 168
jumpa
  • 658
  • 1
  • 9
  • 22

3 Answers3

0

I had some issues similar to this when installing Ruby 2.0.0. I had to do:

rvm get head
rvm pkg remove
rvm requirements run
rvm reinstall 2.0.0

(or 1.9.3 in your case)

source

Mike Campbell
  • 7,921
  • 2
  • 38
  • 51
0

This will happen if your mac has an outdated version of OpenSSL or the certificate files. It seems this exact issue started recently with the release of Ruby 2.0, even if that isn't the version you're trying to install with RVM. A friend of mine ran into the same issue earlier this week, nothing on stackoverflow or google was helping.

Check out this link for updating OpenSSL: http://railsapps.github.com/openssl-certificate-verify-failed.html

EDIT: OSX comes with an outdated version now so if you haven't updated then it will definitely cause issues.

Mike S
  • 11,329
  • 6
  • 41
  • 76