Nick Kahn
Nick Kahn

Reputation: 20078

Not loading library : rubygems/core_ext/kernel_require

Searched before posting, I could not able to fix the issue and I'm getting the following library errors and I'm not sure how to fix this and I don't have Ruby background so be gentle with me.

on my machine I have openssl version is : LibreSSL 2.8.3

Any help please?

/Users/john.doe/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': dlopen(/Users/john.doe/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/x86_64-darwin16/digest/sha1.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib (LoadError)
    
      Refere

nced from: /Users/john.doe/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/x86_64-darwin16/digest/sha1.bundle

  Reason: image not found - /Users/john.doe/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/x86_64-darwin16/digest/sha1.bundle

from /Users/john.doe/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'

from /Users/john.doe/.rvm/gems/ruby-2.3.1/gems/bundler-1.15.4/lib/bundler/source/git.rb:4:in `<top (required)>'

from /Users/john.doe/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'

from /Users/john.doe/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'

from /Users/john.doe/.rvm/gems/ruby-2.3.1/gems/bundler-1.15.4/lib/bundler/lockfile_parser.rb:122:in `<class:LockfileParser>'

from /Users/john.doe/.rvm/gems/ruby-2.3.1/gems/bundler-1.15.4/lib/bundler/lockfile_parser.rb:14:in `<module:Bundler>'

from /Users/john.doe/.rvm/gems/ruby-2.3.1/gems/bundler-1.15.4/lib/bundler/lockfile_parser.rb:13:in `<top (required)>'

from /Users/john.doe/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'

from /Users/john.doe/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'

from /Users/john.doe/.rvm/gems/ruby-2.3.1/gems/bundler-1.15.4/lib/bundler/definition.rb:2:in `<top (required)>'

from /Users/john.doe/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'

from /Users/john.doe/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'

from /Users/john.doe/.rvm/gems/ruby-2.3.1/gems/bundler-1.15.4/lib/bundler.rb:129:in `definition'

from /Users/john.doe/.rvm/gems/ruby-2.3.1/gems/bundler-1.15.4/lib/bundler.rb:95:in `setup'

from /Users/john.doe/.rvm/gems/ruby-2.3.1/gems/bundler-1.15.4/lib/bundler/setup.rb:9:in `<top (required)>'

from /Users/john.doe/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:133:in `require'

from /Users/john.doe/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:133:in `rescue in require'

from /Users/john.doe/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require' 

Upvotes: 1

Views: 1474

Answers (1)

anothermh
anothermh

Reputation: 10546

The problem is that Ruby can't find the version of OpenSSL that it was compiled with. Reinstall OpenSSL (through whatever means you care to, e.g., brew install openssl), then reinstall Ruby:

rvm uninstall 2.3.1
rvm install 2.3.1

Once Ruby has been reinstalled, install your gems:

bundle install

Then retry your operation.

Upvotes: 1

Related Questions