0

rails s gives following error. I have set the default ruby version as 2.6.3, Gemfile also contains the same. I also try to create a new app and it's working fine. Any advice to fix this issue? My current os is Mac Catalina. I have already tried to uninstall OpenSSL and reinstall it. But no luck.

    58: from /Users/Choota/Documents/Chathura/Personal/LurnRoR/bin/rails:3:in `<main>'
    57: from /Users/Choota/Documents/Chathura/Personal/LurnRoR/bin/rails:3:in `load'
    56: from /Users/Choota/Documents/Chathura/Personal/LurnRoR/bin/spring:15:in `<top (required)>'
    55: from /Users/Choota/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    54: from /Users/Choota/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    53: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `<top (required)>'
    52: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `load'
    51: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/bin/spring:49:in `<top (required)>'
    50: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/client.rb:30:in `run'
    49: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/client/command.rb:7:in `call'
    48: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/client/rails.rb:28:in `call'
    47: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/client/rails.rb:28:in `load'
    46: from /Users/Choota/Documents/Chathura/Personal/LurnRoR/bin/rails:9:in `<top (required)>'
    45: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
    44: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
    43: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
    42: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
    41: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
    40: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
    39: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
    38: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
    37: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/railties-5.2.3/lib/rails/commands.rb:18:in `<main>'
    36: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/railties-5.2.3/lib/rails/command.rb:46:in `invoke'
    35: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/railties-5.2.3/lib/rails/command/base.rb:65:in `perform'
    34: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
    33: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
    32: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
    31: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:142:in `perform'
    30: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:142:in `tap'
    29: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:145:in `block in perform'
    28: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
    27: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
    26: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
    25: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
    24: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
    23: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
    22: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
    21: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
    20: from /Users/Choota/Documents/Chathura/Personal/LurnRoR/config/application.rb:18:in `<main>'
    19: from /Users/Choota/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/bundler.rb:114:in `require'
    18: from /Users/Choota/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/bundler/runtime.rb:65:in `require'
    17: from /Users/Choota/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/bundler/runtime.rb:65:in `each'
    16: from /Users/Choota/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/bundler/runtime.rb:76:in `block in require'
    15: from /Users/Choota/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/bundler/runtime.rb:76:in `each'
    14: from /Users/Choota/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/bundler/runtime.rb:81:in `block (2 levels) in require'
    13: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
    12: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
    11: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
    10: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
     9: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
     8: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/pg-1.1.4/lib/pg.rb:4:in `<main>'
     7: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
     6: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
     5: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
     4: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
     3: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
     2: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
     1: from /Users/Choota/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
/Users/Choota/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require': dlopen(/Users/Choota/.rvm/gems/ruby-2.6.3/gems/pg-1.1.4/lib/pg_ext.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib (LoadError)
  Referenced from: /usr/local/opt/postgresql/lib/libpq.5.dylib
  Reason: image not found - /Users/Choota/.rvm/gems/ruby-2.6.3/gems/pg-1.1.4/lib/pg_ext.bundle

As it gives the reason, image not found, I have tried many way but still cannot run my older projects.

  • 1
    You have to reinstall the pg gem, after some update (brew?) probably also the version of openssl was changed. – nathanvda Dec 20 '19 at 13:16
  • 1
    I have tried that way. No good. But fixed it after removing and re installing postgres. PG gem looks ok. Thank you.. you made me look something i never thought. – Chathura Jayanath Dec 21 '19 at 16:10

1 Answers1

0

Can you try this steps first:

gem install pg
gem pristine --all

If this doesn't work then can you please try this solution here: Incompatible library version

Nezir
  • 6,727
  • 12
  • 54
  • 78