1

When I run rbenv versions I get:

  system
  2.3.1
  2.4.1
  2.4.2
  2.4.3
  2.5.0
  2.5.1
* 2.6.3 (set by /Users/me/Documents/procore/.ruby-version)

But when I run gem install bundler I get:

ERROR:  Loading command: install (LoadError)
    dlopen(/Users/me/.rbenv/versions/2.6.3/lib/ruby/2.6.0/x86_64-darwin18/openssl.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /Users/me/.rbenv/versions/2.6.3/lib/ruby/2.6.0/x86_64-darwin18/openssl.bundle
  Reason: image not found - /Users/me/.rbenv/versions/2.6.3/lib/ruby/2.6.0/x86_64-darwin18/openssl.bundle
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass
the Tin Man
  • 158,662
  • 42
  • 215
  • 303
stackjlei
  • 9,485
  • 18
  • 65
  • 113
  • 1
    It looks like it's telling you that it can't find openssl rather than a specific ruby version. This Q+A is using Ruby Version Manager but may help https://stackoverflow.com/questions/15392752/what-can-i-do-to-resolve-this-error-when-trying-to-install-bundler – Cjmarkham Feb 07 '20 at 20:22
  • 2
    After an operating system upgrade you may need to rebuild or reinstall any versions of Ruby you use as the shared libraries linked against may have changed. – tadman Feb 07 '20 at 20:56
  • 1
    @tadman is correct; OS changes can update libraries and any native code previously compiled can suddenly break so recompiling is necessary. `gem pristine` might help. See `gem help pristine` for more information. – the Tin Man Feb 08 '20 at 18:55

0 Answers0